Add env var to toggle pivot root or ms_move
Use the DOCKER_RAMDISK env var to tell the native driver not to use a pivot root when setting up the rootfs of a container. Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
ca93316795
commit
da605a43d6
3 changed files with 49 additions and 20 deletions
|
@ -11,17 +11,18 @@ type Context map[string]string
|
|||
// Container defines configuration options for how a
|
||||
// container is setup inside a directory and how a process should be executed
|
||||
type Container struct {
|
||||
Hostname string `json:"hostname,omitempty"` // hostname
|
||||
ReadonlyFs bool `json:"readonly_fs,omitempty"` // set the containers rootfs as readonly
|
||||
User string `json:"user,omitempty"` // user to execute the process as
|
||||
WorkingDir string `json:"working_dir,omitempty"` // current working directory
|
||||
Env []string `json:"environment,omitempty"` // environment to set
|
||||
Tty bool `json:"tty,omitempty"` // setup a proper tty or not
|
||||
Namespaces Namespaces `json:"namespaces,omitempty"` // namespaces to apply
|
||||
Capabilities Capabilities `json:"capabilities,omitempty"` // capabilities to drop
|
||||
Networks []*Network `json:"networks,omitempty"` // nil for host's network stack
|
||||
Cgroups *cgroups.Cgroup `json:"cgroups,omitempty"` // cgroups
|
||||
Context Context `json:"context,omitempty"` // generic context for specific options (apparmor, selinux)
|
||||
Hostname string `json:"hostname,omitempty"` // hostname
|
||||
ReadonlyFs bool `json:"readonly_fs,omitempty"` // set the containers rootfs as readonly
|
||||
NoPivotRoot bool `json:"no_pivot_root,omitempty"` // this can be enabled if you are running in ramdisk
|
||||
User string `json:"user,omitempty"` // user to execute the process as
|
||||
WorkingDir string `json:"working_dir,omitempty"` // current working directory
|
||||
Env []string `json:"environment,omitempty"` // environment to set
|
||||
Tty bool `json:"tty,omitempty"` // setup a proper tty or not
|
||||
Namespaces Namespaces `json:"namespaces,omitempty"` // namespaces to apply
|
||||
Capabilities Capabilities `json:"capabilities,omitempty"` // capabilities to drop
|
||||
Networks []*Network `json:"networks,omitempty"` // nil for host's network stack
|
||||
Cgroups *cgroups.Cgroup `json:"cgroups,omitempty"` // cgroups
|
||||
Context Context `json:"context,omitempty"` // generic context for specific options (apparmor, selinux)
|
||||
}
|
||||
|
||||
// Network defines configuration for a container's networking stack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue