// IDMap represents UID/GID Mappings for User Namespaces.
typeIDMapstruct{
ContainerIDint`json:"container_id"`
HostIDint`json:"host_id"`
Sizeint`json:"size"`
}
// Seccomp represents syscall restrictions
// By default, only the native architecture of the kernel is allowed to be used
// for syscalls. Additional architectures can be added by specifying them in
// Architectures.
typeSeccompstruct{
DefaultActionAction`json:"default_action"`
Architectures[]string`json:"architectures"`
Syscalls[]*Syscall`json:"syscalls"`
}
// An action to be taken upon rule match in Seccomp
typeActionint
const(
KillAction=iota+1
Errno
Trap
Allow
Trace
)
// A comparison operator to be used when matching syscall arguments in Seccomp
typeOperatorint
const(
EqualToOperator=iota+1
NotEqualTo
GreaterThan
GreaterThanOrEqualTo
LessThan
LessThanOrEqualTo
MaskEqualTo
)
// A rule to match a specific syscall argument in Seccomp
typeArgstruct{
Indexuint`json:"index"`
Valueuint64`json:"value"`
ValueTwouint64`json:"value_two"`
OpOperator`json:"op"`
}
// An rule to match a syscall in Seccomp
typeSyscallstruct{
Namestring`json:"name"`
ActionAction`json:"action"`
Args[]*Arg`json:"args"`
}
// TODO Windows. Many of these fields should be factored out into those parts
// which are common across platforms, and those which are platform specific.
// Config defines configuration options for executing a process inside a contained environment.
typeConfigstruct{
// NoPivotRoot will use MS_MOVE and a chroot to jail the process into the container's rootfs
// This is a common option when the container is running in ramdisk
NoPivotRootbool`json:"no_pivot_root"`
// ParentDeathSignal specifies the signal that is sent to the container's process in the case
// that the parent process dies.
ParentDeathSignalint`json:"parent_death_signal"`
// PivotDir allows a custom directory inside the container's root filesystem to be used as pivot, when NoPivotRoot is not set.
// When a custom PivotDir not set, a temporary dir inside the root filesystem will be used. The pivot dir needs to be writeable.
// This is required when using read only root filesystems. In these cases, a read/writeable path can be (bind) mounted somewhere inside the root filesystem to act as pivot.
PivotDirstring`json:"pivot_dir"`
// Path to a directory containing the container's root filesystem.
Rootfsstring`json:"rootfs"`
// Readonlyfs will remount the container's rootfs as readonly where only externally mounted
// bind mounts are writtable.
Readonlyfsbool`json:"readonlyfs"`
// Specifies the mount propagation flags to be applied to /.
RootPropagationint`json:"rootPropagation"`
// Mounts specify additional source and destination paths that will be mounted inside the container's
// rootfs and mount namespace if specified
Mounts[]*Mount`json:"mounts"`
// The device nodes that should be automatically created within the container upon container start. Note, make sure that the node is marked as allowed in the cgroup as well!
Devices[]*Device`json:"devices"`
MountLabelstring`json:"mount_label"`
// Hostname optionally sets the container's hostname if provided
Hostnamestring`json:"hostname"`
// Namespaces specifies the container's namespaces that it should setup when cloning the init process
// If a namespace is not provided that namespace is shared from the container's parent process
NamespacesNamespaces`json:"namespaces"`
// Capabilities specify the capabilities to keep when executing the process inside the container
// All capbilities not specified will be dropped from the processes capability mask
Capabilities[]string`json:"capabilities"`
// Networks specifies the container's network setup to be created
Networks[]*Network`json:"networks"`
// Routes can be specified to create entries in the route table as the container is started
Routes[]*Route`json:"routes"`
// Cgroups specifies specific cgroup settings for the various subsystems that the container is
// placed into to limit the resources the container has available
Cgroups*Cgroup`json:"cgroups"`
// AppArmorProfile specifies the profile to apply to the process running in the container and is