Skip to content

dsdk / v1.47 / HostConfig

Type Alias: HostConfig ​

HostConfig: Resources & object

Container configuration that depends on the host we are running on

Type declaration ​

NameTypeDescription
Annotations?objectArbitrary non-identifying metadata attached to container and provided to the runtime when the container is started.
AutoRemove?booleanAutomatically remove the container when the container's process exits. This has no effect if RestartPolicy is set.
Binds?string[]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
CapAdd?string[]A list of kernel capabilities to add to the container. Conflicts with option 'Capabilities'.
CapDrop?string[]A list of kernel capabilities to drop from the container. Conflicts with option 'Capabilities'.
Cgroup?stringCgroup to use for the container.
CgroupnsMode?"private" | "host"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.
ConsoleSize?[number, number] | nullInitial console size, as an [height, width] array.
ContainerIDFile?stringPath to a file where the container ID is written
Dns?string[]A list of DNS servers for the container to use.
DnsOptions?string[]A list of DNS options.
DnsSearch?string[]A list of DNS search domains.
ExtraHosts?string[]A list of hostnames/IP mappings to add to the container's /etc/hosts file. Specified in the form ["hostname:IP"].
GroupAdd?string[]A list of additional groups that the container process will run as.
IpcMode?stringIPC 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
Isolation?"default" | "process" | "hyperv"Isolation technology of the container. (Windows only)
Links?string[]A list of links for the container in the form container_name:alias.
LogConfig?objectThe logging configuration for this container
LogConfig.Config?object-
LogConfig.Type?"json-file" | "syslog" | "journald" | "gelf" | "fluentd" | "awslogs" | "splunk" | "etwlogs" | "none"-
MaskedPaths?string[]The list of paths to be masked inside the container (this overrides the default set of paths).
Mounts?Mount[]Specification for mounts to be added to the container.
NetworkMode?stringNetwork mode to use for this container. Supported standard values are: bridge, host, none, and `container:<name
OomScoreAdj?numberAn integer value containing the score given to the container in order to tune OOM killer preferences.
PidMode?stringSet the PID (Process) Namespace mode for the container. It can be either: - `"container:<name
PortBindings?PortMap-
Privileged?booleanGives the container full access to the host.
PublishAllPorts?booleanAllocates 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.
ReadonlyPaths?string[]The list of paths to be set as read-only inside the container (this overrides the default set of paths).
ReadonlyRootfs?booleanMount the container's root filesystem as read only.
RestartPolicy?RestartPolicy-
Runtime?stringRuntime to use with this container.
SecurityOpt?string[]A list of string values to customize labels for MLS systems, such as SELinux.
ShmSize?numberSize of /dev/shm in bytes. If omitted, the system uses 64MB.
StorageOpt?objectStorage driver options for this container, in the form {"size": "120G"}.
Sysctls?objectA list of kernel parameters (sysctls) to set in the container. For example: {"net.ipv4.ip_forward": "1"}
Tmpfs?objectA map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: { "/run": "rw,noexec,nosuid,size=65536k" }
UsernsMode?stringSets the usernamespace mode for the container when usernamespace remapping option is enabled.
UTSMode?stringUTS namespace to use for the container.
VolumeDriver?stringDriver that this container uses to mount volumes.
VolumesFrom?string[]A list of volumes to inherit from another container, specified in the form: <container-name>[:<ro|rw>]