Documentation ¶
Index ¶
- func Enter(cdir string, imageID *types.Hash, cmdline []string) error
- func MergeEnvs(appEnv *types.Environment, inheritEnv bool, setEnv []string)
- func Prepare(cfg PrepareConfig, dir string, uuid *types.UUID) error
- func Run(cfg RunConfig, dir string)
- type CommonConfig
- type PrepareConfig
- type RunConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enter ¶ added in v0.2.0
Enter enters the container by exec()ing the stage1's /enter similar to /init /enter can expect to have its CWD set to the container root imageID and command are supplied to /enter on argv followed by any arguments
func MergeEnvs ¶ added in v0.4.0
func MergeEnvs(appEnv *types.Environment, inheritEnv bool, setEnv []string)
MergeEnvs amends appEnv setting variables in setEnv before setting anything new from os.Environ if inheritEnv = true setEnv is expected to be in the os.Environ() key=value format
Types ¶
type CommonConfig ¶ added in v0.4.0
type CommonConfig struct { Store *cas.Store // store containing all of the configured application images ContainersDir string // root directory for rocket containers Debug bool }
configuration shared by both Run and Prepare
type PrepareConfig ¶ added in v0.4.0
type PrepareConfig struct { CommonConfig // TODO(jonboulle): These images are partially-populated hashes, this should be clarified. Stage1Image types.Hash // stage1 image containing usable /init and /enter entrypoints Images []types.Hash // application images ExecAppends [][]string // appendages to each image's app.exec lines (empty when none, length should match length of Images) Volumes []types.Volume // list of volumes that rocket can provide to applications InheritEnv bool // inherit parent environment into apps ExplicitEnv []string // always set these environment variables for all the apps }
configuration parameters required by Prepare
type RunConfig ¶ added in v0.4.0
type RunConfig struct { CommonConfig PrivateNet bool // container should have its own network stack SpawnMetadataService bool // launch metadata service LockFd int // lock file descriptor Interactive bool // whether the container is interactive or not }
configuration parameters needed by Run
Click to show internal directories.
Click to hide internal directories.