Type Alias: HostConfig ​
HostConfig:
Resources
&object
Container configuration that depends on the host we are running on
Type declaration ​
Name | Type | Description |
---|---|---|
Annotations ? | object | Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started. |
AutoRemove ? | boolean | Automatically 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 ? | string | Cgroup 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 ] | null | Initial console size, as an [height, width] array. |
ContainerIDFile ? | string | Path 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 ? | string | 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 |
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 ? | object | The 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 ? | string | Network mode to use for this container. Supported standard values are: bridge , host , none , and `container:<name |
OomScoreAdj ? | number | An integer value containing the score given to the container in order to tune OOM killer preferences. |
PidMode ? | string | Set the PID (Process) Namespace mode for the container. It can be either: - `"container:<name |
PortBindings ? | PortMap | - |
Privileged ? | boolean | Gives the container full access to the host. |
PublishAllPorts ? | boolean | 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 . |
ReadonlyPaths ? | string [] | The list of paths to be set as read-only inside the container (this overrides the default set of paths). |
ReadonlyRootfs ? | boolean | Mount the container's root filesystem as read only. |
RestartPolicy ? | RestartPolicy | - |
Runtime ? | string | Runtime to use with this container. |
SecurityOpt ? | string [] | A list of string values to customize labels for MLS systems, such as SELinux. |
ShmSize ? | number | Size of /dev/shm in bytes. If omitted, the system uses 64MB. |
StorageOpt ? | object | Storage driver options for this container, in the form {"size": "120G"} . |
Sysctls ? | object | A list of kernel parameters (sysctls) to set in the container. For example: {"net.ipv4.ip_forward": "1"} |
Tmpfs ? | object | 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" } |
UsernsMode ? | string | Sets the usernamespace mode for the container when usernamespace remapping option is enabled. |
UTSMode ? | string | UTS namespace to use for the container. |
VolumeDriver ? | string | Driver 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>] |