Add more OCI options

- Sysctl
- CgroupsPath
- RootfsPropagation

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2017-04-05 20:46:16 +01:00
parent 1602277ba7
commit d0aff83a21

View File

@ -65,6 +65,9 @@ type MobyImage struct {
Hostname string Hostname string
OomScoreAdj int `yaml:"oomScoreAdj"` OomScoreAdj int `yaml:"oomScoreAdj"`
DisableOOMKiller bool `yaml:"disableOOMKiller"` DisableOOMKiller bool `yaml:"disableOOMKiller"`
RootfsPropagation string `yaml:"rootfsPropagation"`
CgroupsPath string `yaml:"cgroupsPath"`
Sysctl map[string]string
} }
// NewConfig parses a config file // NewConfig parses a config file
@ -349,7 +352,7 @@ func ConfigInspectToOCI(image *MobyImage, inspect types.ImageInspect) ([]byte, e
oci.Linux = &specs.Linux{ oci.Linux = &specs.Linux{
// UIDMappings // UIDMappings
// GIDMappings // GIDMappings
// Sysctl Sysctl: image.Sysctl,
Resources: &specs.LinuxResources{ Resources: &specs.LinuxResources{
// Devices // Devices
DisableOOMKiller: &image.DisableOOMKiller, DisableOOMKiller: &image.DisableOOMKiller,
@ -360,11 +363,11 @@ func ConfigInspectToOCI(image *MobyImage, inspect types.ImageInspect) ([]byte, e
// HugepageLimits // HugepageLimits
// Network // Network
}, },
// CgroupsPath CgroupsPath: image.CgroupsPath,
Namespaces: namespaces, Namespaces: namespaces,
// Devices // Devices
// Seccomp // Seccomp
// RootfsPropagation RootfsPropagation: image.RootfsPropagation,
// MaskedPaths // MaskedPaths
// ReadonlyPaths // ReadonlyPaths
// MountLabel // MountLabel