mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-25 19:54:38 +00:00
Merge pull request #1511 from justincormack/oci-add
Add more OCI options
This commit is contained in:
commit
d740624db6
@ -44,27 +44,30 @@ type Moby struct {
|
|||||||
|
|
||||||
// MobyImage is the type of an image config
|
// MobyImage is the type of an image config
|
||||||
type MobyImage struct {
|
type MobyImage struct {
|
||||||
Name string
|
Name string
|
||||||
Image string
|
Image string
|
||||||
Capabilities []string
|
Capabilities []string
|
||||||
Mounts []specs.Mount
|
Mounts []specs.Mount
|
||||||
Binds []string
|
Binds []string
|
||||||
Tmpfs []string
|
Tmpfs []string
|
||||||
Command []string
|
Command []string
|
||||||
Env []string
|
Env []string
|
||||||
Cwd string
|
Cwd string
|
||||||
Net string
|
Net string
|
||||||
Pid string
|
Pid string
|
||||||
Ipc string
|
Ipc string
|
||||||
Uts string
|
Uts string
|
||||||
Readonly bool
|
Readonly bool
|
||||||
UID uint32 `yaml:"uid"`
|
UID uint32 `yaml:"uid"`
|
||||||
GID uint32 `yaml:"gid"`
|
GID uint32 `yaml:"gid"`
|
||||||
AdditionalGids []uint32 `yaml:"additionalGids"`
|
AdditionalGids []uint32 `yaml:"additionalGids"`
|
||||||
NoNewPrivileges bool `yaml:"noNewPrivileges"`
|
NoNewPrivileges bool `yaml:"noNewPrivileges"`
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user