HostConfig

@Serializable
data class HostConfig(val cpuShares: Int? = null, val memory: Long? = 0, val cgroupParent: String? = null, val blkioWeight: Int? = null, val blkioWeightDevice: List<ResourcesBlkioWeightDeviceInner>? = null, val blkioDeviceReadBps: List<ThrottleDevice>? = null, val blkioDeviceWriteBps: List<ThrottleDevice>? = null, val blkioDeviceReadIOps: List<ThrottleDevice>? = null, val blkioDeviceWriteIOps: List<ThrottleDevice>? = null, val cpuPeriod: Long? = null, val cpuQuota: Long? = null, val cpuRealtimePeriod: Long? = null, val cpuRealtimeRuntime: Long? = null, val cpusetCpus: String? = null, val cpusetMems: String? = null, val devices: List<DeviceMapping>? = null, val deviceCgroupRules: List<String>? = null, val deviceRequests: List<DeviceRequest>? = null, val kernelMemoryTCP: Long? = null, val memoryReservation: Long? = null, val memorySwap: Long? = null, val memorySwappiness: Long? = null, val nanoCpus: Long? = null, val oomKillDisable: Boolean? = null, val init: Boolean? = null, val pidsLimit: Long? = null, val ulimits: List<ResourcesUlimitsInner>? = null, val cpuCount: Long? = null, val cpuPercent: Long? = null, val ioMaximumIOps: Long? = null, val ioMaximumBandwidth: Long? = null, val binds: List<String>? = null, val containerIDFile: String? = null, val logConfig: HostConfigAllOfLogConfig? = null, val networkMode: String? = null, val portBindings: Map<String, List<PortBinding>?>? = null, val restartPolicy: RestartPolicy? = null, val autoRemove: Boolean? = null, val volumeDriver: String? = null, val volumesFrom: List<String>? = null, val mounts: List<Mount>? = null, val consoleSize: List<Int>? = null, val annotations: Map<String, String>? = null, val capAdd: List<String>? = null, val capDrop: List<String>? = null, val cgroupnsMode: HostConfig.CgroupnsMode? = null, val dns: List<String>? = null, val dnsOptions: List<String>? = null, val dnsSearch: List<String>? = null, val extraHosts: List<String>? = null, val groupAdd: List<String>? = null, val ipcMode: String? = null, val cgroup: String? = null, val links: List<String>? = null, val oomScoreAdj: Int? = null, val pidMode: String? = null, val privileged: Boolean? = null, val publishAllPorts: Boolean? = null, val readonlyRootfs: Boolean? = null, val securityOpt: List<String>? = null, val storageOpt: Map<String, String>? = null, val tmpfs: Map<String, String>? = null, val utSMode: String? = null, val usernsMode: String? = null, val shmSize: Long? = null, val sysctls: Map<String, String>? = null, val runtime: String? = null, val isolation: HostConfig.Isolation? = null, val maskedPaths: List<String>? = null, val readonlyPaths: List<String>? = null)

Container configuration that depends on the host we are running on

Parameters

cpuShares

An integer value representing this container's relative CPU weight versus other containers.

memory

Memory limit in bytes.

cgroupParent

Path to cgroups under which the container's cgroup is created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups are created if they do not already exist.

blkioWeight

Block IO weight (relative weight).

blkioWeightDevice

Block IO weight (relative device weight) in the form: `` [{\"Path\": \"device_path\", \"Weight\": weight}] `` @param blkioDeviceReadBps Limit read rate (bytes per second) from a device, in the form: `` [{\"Path\": \"device_path\", \"Rate\": rate}] `` @param blkioDeviceWriteBps Limit write rate (bytes per second) to a device, in the form: `` [{\"Path\": \"device_path\", \"Rate\": rate}] `` @param blkioDeviceReadIOps Limit read rate (IO per second) from a device, in the form: `` [{\"Path\": \"device_path\", \"Rate\": rate}] `` @param blkioDeviceWriteIOps Limit write rate (IO per second) to a device, in the form: `` [{\"Path\": \"device_path\", \"Rate\": rate}] `` @param cpuPeriod The length of a CPU period in microseconds. @param cpuQuota Microseconds of CPU time that the container can get in a CPU period. @param cpuRealtimePeriod The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. @param cpuRealtimeRuntime The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. @param cpusetCpus CPUs in which to allow execution (e.g., 0-3, 0,1). @param cpusetMems Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. @param devices A list of devices to add to the container. @param deviceCgroupRules a list of cgroup rules to apply to the container @param deviceRequests A list of requests for devices to be sent to device drivers. @param kernelMemoryTCP Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. @param memoryReservation Memory soft limit in bytes. @param memorySwap Total memory limit (memory + swap). Set as -1 to enable unlimited swap. @param memorySwappiness Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. @param nanoCpus CPU quota in units of 10-9 CPUs. @param oomKillDisable Disable OOM Killer for the container. @param init Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. @param pidsLimit Tune a container's PIDs limit. Set 0 or -1 for unlimited, or null to not change. @param ulimits A list of resource limits to set in the container. For example: `` {\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048} `` @param cpuCount The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last. @param cpuPercent The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last. @param ioMaximumIOps Maximum IOps for the container system drive (Windows only) @param ioMaximumBandwidth Maximum IO in bytes per second for the container system drive (Windows only). @param binds A list of volume bindings for this container. Each volume binding is a string in one of these forms: - host-src:container-dest[:options] to bind-mount a host path into the container. Both host-src, and container-dest must be an absolute path. - volume-name:container-dest[:options] to bind-mount a volume managed by a volume driver into the container. container-dest must be an absolute path. options is an optional, comma-delimited list of: - nocopy disables automatic copying of data from the container path to the volume. The nocopy flag only applies to named volumes. - [ro|rw] mounts a volume read-only or read-write, respectively. If omitted or set to rw, volumes are mounted read-write. - [z|Z] applies SELinux labels to allow or deny multiple containers to read and write to the same volume. - z: a shared content label is applied to the content. This label indicates that multiple containers can share the volume content, for both reading and writing. - Z: a private unshared label is applied to the content. This label indicates that only the current container can use a private volume. Labeling systems such as SELinux require proper labels to be placed on volume content that is mounted into a container. Without a label, the security system can prevent a container's processes from using the content. By default, the labels set by the host operating system are not modified. - [[r]shared|[r]slave|[r]private] specifies mount propagation behavior. This only applies to bind-mounted volumes, not internal volumes or named volumes. Mount propagation requires the source mount point (the location where the source directory is mounted in the host operating system) to have the correct propagation properties. For shared volumes, the source mount point must be set to shared. For slave volumes, the mount must be set to either shared or slave. @param containerIDFile Path to a file where the container ID is written @param logConfig @param networkMode Network mode to use for this container. Supported standard values are: bridge, host, none, and container:<name|id>. Any other value is taken as a custom network's name to which this container should connect to. @param portBindings PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format <port>/<protocol>, for example, 80/udp. If a container's port is mapped for multiple protocols, separate entries are added to the mapping table. @param restartPolicy @param autoRemove Automatically remove the container when the container's process exits. This has no effect if RestartPolicy is set. @param volumeDriver Driver that this container uses to mount volumes. @param volumesFrom A list of volumes to inherit from another container, specified in the form <container name>[:<ro|rw>]. @param mounts Specification for mounts to be added to the container. @param consoleSize Initial console size, as an [height, width] array. @param annotations Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started. @param capAdd A list of kernel capabilities to add to the container. Conflicts with option 'Capabilities'. @param capDrop A list of kernel capabilities to drop from the container. Conflicts with option 'Capabilities'. @param cgroupnsMode cgroup namespace mode for the container. Possible values are: - \"private\": the container runs in its own private cgroup namespace - \"host\": use the host system's cgroup namespace If not specified, the daemon default is used, which can either be \"private\" or \"host\", depending on daemon version, kernel support and configuration. @param dns A list of DNS servers for the container to use. @param dnsOptions A list of DNS options. @param dnsSearch A list of DNS search domains. @param extraHosts A list of hostnames/IP mappings to add to the container's /etc/hosts file. Specified in the form [\"hostname:IP\"]. @param groupAdd A list of additional groups that the container process will run as. @param ipcMode IPC sharing mode for the container. Possible values are: - \"none\": own private IPC namespace, with /dev/shm not mounted - \"private\": own private IPC namespace - \"shareable\": own private IPC namespace, with a possibility to share it with other containers - \"container:<name|id>\": join another (shareable) container's IPC namespace - \"host\": use the host system's IPC namespace If not specified, daemon default is used, which can either be \"private\" or \"shareable\", depending on daemon version and configuration. @param cgroup Cgroup to use for the container. @param links A list of links for the container in the form container_name:alias. @param oomScoreAdj An integer value containing the score given to the container in order to tune OOM killer preferences. @param pidMode Set the PID (Process) Namespace mode for the container. It can be either: - \"container:<name|id>\": joins another container's PID namespace - \"host\": use the host's PID namespace inside the container @param privileged Gives the container full access to the host. @param publishAllPorts Allocates an ephemeral host port for all of a container's exposed ports. Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container. The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by /proc/sys/net/ipv4/ip_local_port_range. @param readonlyRootfs Mount the container's root filesystem as read only. @param securityOpt A list of string values to customize labels for MLS systems, such as SELinux. @param storageOpt Storage driver options for this container, in the form {\"size\": \"120G\"}. @param tmpfs A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `` { \"/run\": \"rw,noexec,nosuid,size=65536k\" } `` @param utSMode UTS namespace to use for the container. @param usernsMode Sets the usernamespace mode for the container when usernamespace remapping option is enabled. @param shmSize Size of /dev/shm in bytes. If omitted, the system uses 64MB. @param sysctls A list of kernel parameters (sysctls) to set in the container. This field is omitted if not set. @param runtime Runtime to use with this container. @param isolation Isolation technology of the container. (Windows only) @param maskedPaths The list of paths to be masked inside the container (this overrides the default set of paths). @param readonlyPaths The list of paths to be set as read-only inside the container (this overrides the default set of paths).

Constructors

Link copied to clipboard
constructor(cpuShares: Int? = null, memory: Long? = 0, cgroupParent: String? = null, blkioWeight: Int? = null, blkioWeightDevice: List<ResourcesBlkioWeightDeviceInner>? = null, blkioDeviceReadBps: List<ThrottleDevice>? = null, blkioDeviceWriteBps: List<ThrottleDevice>? = null, blkioDeviceReadIOps: List<ThrottleDevice>? = null, blkioDeviceWriteIOps: List<ThrottleDevice>? = null, cpuPeriod: Long? = null, cpuQuota: Long? = null, cpuRealtimePeriod: Long? = null, cpuRealtimeRuntime: Long? = null, cpusetCpus: String? = null, cpusetMems: String? = null, devices: List<DeviceMapping>? = null, deviceCgroupRules: List<String>? = null, deviceRequests: List<DeviceRequest>? = null, kernelMemoryTCP: Long? = null, memoryReservation: Long? = null, memorySwap: Long? = null, memorySwappiness: Long? = null, nanoCpus: Long? = null, oomKillDisable: Boolean? = null, init: Boolean? = null, pidsLimit: Long? = null, ulimits: List<ResourcesUlimitsInner>? = null, cpuCount: Long? = null, cpuPercent: Long? = null, ioMaximumIOps: Long? = null, ioMaximumBandwidth: Long? = null, binds: List<String>? = null, containerIDFile: String? = null, logConfig: HostConfigAllOfLogConfig? = null, networkMode: String? = null, portBindings: Map<String, List<PortBinding>?>? = null, restartPolicy: RestartPolicy? = null, autoRemove: Boolean? = null, volumeDriver: String? = null, volumesFrom: List<String>? = null, mounts: List<Mount>? = null, consoleSize: List<Int>? = null, annotations: Map<String, String>? = null, capAdd: List<String>? = null, capDrop: List<String>? = null, cgroupnsMode: HostConfig.CgroupnsMode? = null, dns: List<String>? = null, dnsOptions: List<String>? = null, dnsSearch: List<String>? = null, extraHosts: List<String>? = null, groupAdd: List<String>? = null, ipcMode: String? = null, cgroup: String? = null, links: List<String>? = null, oomScoreAdj: Int? = null, pidMode: String? = null, privileged: Boolean? = null, publishAllPorts: Boolean? = null, readonlyRootfs: Boolean? = null, securityOpt: List<String>? = null, storageOpt: Map<String, String>? = null, tmpfs: Map<String, String>? = null, utSMode: String? = null, usernsMode: String? = null, shmSize: Long? = null, sysctls: Map<String, String>? = null, runtime: String? = null, isolation: HostConfig.Isolation? = null, maskedPaths: List<String>? = null, readonlyPaths: List<String>? = null)

Types

Link copied to clipboard

cgroup namespace mode for the container. Possible values are: - \"private\": the container runs in its own private cgroup namespace - \"host\": use the host system's cgroup namespace If not specified, the daemon default is used, which can either be \"private\" or \"host\", depending on daemon version, kernel support and configuration.

Link copied to clipboard
@Serializable
enum Isolation : Enum<HostConfig.Isolation>

Isolation technology of the container. (Windows only)

Properties

Link copied to clipboard
@SerialName(value = "Annotations")
val annotations: Map<String, String>?
Link copied to clipboard
@SerialName(value = "AutoRemove")
val autoRemove: Boolean?
Link copied to clipboard
@SerialName(value = "Binds")
val binds: List<String>?
Link copied to clipboard
@SerialName(value = "BlkioDeviceReadBps")
val blkioDeviceReadBps: List<ThrottleDevice>?
Link copied to clipboard
@SerialName(value = "BlkioDeviceReadIOps")
val blkioDeviceReadIOps: List<ThrottleDevice>?
Link copied to clipboard
@SerialName(value = "BlkioDeviceWriteBps")
val blkioDeviceWriteBps: List<ThrottleDevice>?
Link copied to clipboard
@SerialName(value = "BlkioDeviceWriteIOps")
val blkioDeviceWriteIOps: List<ThrottleDevice>?
Link copied to clipboard
@SerialName(value = "BlkioWeight")
val blkioWeight: Int?
Link copied to clipboard
@SerialName(value = "BlkioWeightDevice")
val blkioWeightDevice: List<ResourcesBlkioWeightDeviceInner>?
Link copied to clipboard
@SerialName(value = "CapAdd")
val capAdd: List<String>?
Link copied to clipboard
@SerialName(value = "CapDrop")
val capDrop: List<String>?
Link copied to clipboard
@SerialName(value = "Cgroup")
val cgroup: String?
Link copied to clipboard
@SerialName(value = "CgroupnsMode")
val cgroupnsMode: HostConfig.CgroupnsMode?
Link copied to clipboard
@SerialName(value = "CgroupParent")
val cgroupParent: String?
Link copied to clipboard
@SerialName(value = "ConsoleSize")
val consoleSize: List<Int>?
Link copied to clipboard
@SerialName(value = "ContainerIDFile")
val containerIDFile: String?
Link copied to clipboard
@SerialName(value = "CpuCount")
val cpuCount: Long?
Link copied to clipboard
@SerialName(value = "CpuPercent")
val cpuPercent: Long?
Link copied to clipboard
@SerialName(value = "CpuPeriod")
val cpuPeriod: Long?
Link copied to clipboard
@SerialName(value = "CpuQuota")
val cpuQuota: Long?
Link copied to clipboard
@SerialName(value = "CpuRealtimePeriod")
val cpuRealtimePeriod: Long?
Link copied to clipboard
@SerialName(value = "CpuRealtimeRuntime")
val cpuRealtimeRuntime: Long?
Link copied to clipboard
@SerialName(value = "CpusetCpus")
val cpusetCpus: String?
Link copied to clipboard
@SerialName(value = "CpusetMems")
val cpusetMems: String?
Link copied to clipboard
@SerialName(value = "CpuShares")
val cpuShares: Int?
Link copied to clipboard
@SerialName(value = "DeviceCgroupRules")
val deviceCgroupRules: List<String>?
Link copied to clipboard
@SerialName(value = "DeviceRequests")
val deviceRequests: List<DeviceRequest>?
Link copied to clipboard
@SerialName(value = "Devices")
val devices: List<DeviceMapping>?
Link copied to clipboard
@SerialName(value = "Dns")
val dns: List<String>?
Link copied to clipboard
@SerialName(value = "DnsOptions")
val dnsOptions: List<String>?
Link copied to clipboard
@SerialName(value = "DnsSearch")
val dnsSearch: List<String>?
Link copied to clipboard
@SerialName(value = "ExtraHosts")
val extraHosts: List<String>?
Link copied to clipboard
@SerialName(value = "GroupAdd")
val groupAdd: List<String>?
Link copied to clipboard
@SerialName(value = "Init")
val init: Boolean?
Link copied to clipboard
@SerialName(value = "IOMaximumBandwidth")
val ioMaximumBandwidth: Long?
Link copied to clipboard
@SerialName(value = "IOMaximumIOps")
val ioMaximumIOps: Long?
Link copied to clipboard
@SerialName(value = "IpcMode")
val ipcMode: String?
Link copied to clipboard
@SerialName(value = "Isolation")
val isolation: HostConfig.Isolation?
Link copied to clipboard
@SerialName(value = "KernelMemoryTCP")
val kernelMemoryTCP: Long?
Link copied to clipboard
@SerialName(value = "Links")
val links: List<String>?
Link copied to clipboard
@SerialName(value = "LogConfig")
val logConfig: HostConfigAllOfLogConfig?
Link copied to clipboard
@SerialName(value = "MaskedPaths")
val maskedPaths: List<String>?
Link copied to clipboard
@SerialName(value = "Memory")
val memory: Long?
Link copied to clipboard
@SerialName(value = "MemoryReservation")
val memoryReservation: Long?
Link copied to clipboard
@SerialName(value = "MemorySwap")
val memorySwap: Long?
Link copied to clipboard
@SerialName(value = "MemorySwappiness")
val memorySwappiness: Long?
Link copied to clipboard
@SerialName(value = "Mounts")
val mounts: List<Mount>?
Link copied to clipboard
@SerialName(value = "NanoCpus")
val nanoCpus: Long?
Link copied to clipboard
@SerialName(value = "NetworkMode")
val networkMode: String?
Link copied to clipboard
@SerialName(value = "OomKillDisable")
val oomKillDisable: Boolean?
Link copied to clipboard
@SerialName(value = "OomScoreAdj")
val oomScoreAdj: Int?
Link copied to clipboard
@SerialName(value = "PidMode")
val pidMode: String?
Link copied to clipboard
@SerialName(value = "PidsLimit")
val pidsLimit: Long?
Link copied to clipboard
@SerialName(value = "PortBindings")
val portBindings: Map<String, List<PortBinding>?>?
Link copied to clipboard
@SerialName(value = "Privileged")
val privileged: Boolean?
Link copied to clipboard
@SerialName(value = "PublishAllPorts")
val publishAllPorts: Boolean?
Link copied to clipboard
@SerialName(value = "ReadonlyPaths")
val readonlyPaths: List<String>?
Link copied to clipboard
@SerialName(value = "ReadonlyRootfs")
val readonlyRootfs: Boolean?
Link copied to clipboard
@SerialName(value = "RestartPolicy")
val restartPolicy: RestartPolicy?
Link copied to clipboard
@SerialName(value = "Runtime")
val runtime: String?
Link copied to clipboard
@SerialName(value = "SecurityOpt")
val securityOpt: List<String>?
Link copied to clipboard
@SerialName(value = "ShmSize")
val shmSize: Long?
Link copied to clipboard
@SerialName(value = "StorageOpt")
val storageOpt: Map<String, String>?
Link copied to clipboard
@SerialName(value = "Sysctls")
val sysctls: Map<String, String>?
Link copied to clipboard
@SerialName(value = "Tmpfs")
val tmpfs: Map<String, String>?
Link copied to clipboard
@SerialName(value = "Ulimits")
val ulimits: List<ResourcesUlimitsInner>?
Link copied to clipboard
@SerialName(value = "UsernsMode")
val usernsMode: String?
Link copied to clipboard
@SerialName(value = "UTSMode")
val utSMode: String?
Link copied to clipboard
@SerialName(value = "VolumeDriver")
val volumeDriver: String?
Link copied to clipboard
@SerialName(value = "VolumesFrom")
val volumesFrom: List<String>?