2016-01-03 06:30:31 +03:00
|
|
|
% DOCKER(8) Docker User Manuals
|
2015-10-03 18:56:41 +03:00
|
|
|
% Shishir Mahajan
|
2015-09-17 17:07:22 +03:00
|
|
|
% SEPTEMBER 2015
|
|
|
|
# NAME
|
2016-04-28 09:55:22 +03:00
|
|
|
dockerd - Enable daemon mode
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
# SYNOPSIS
|
2016-04-28 09:55:22 +03:00
|
|
|
**dockerd**
|
2016-07-02 17:22:23 +03:00
|
|
|
[**--add-runtime**[=*[]*]]
|
2017-05-10 00:00:31 +03:00
|
|
|
[**--allow-nondistributable-artifacts**[=*[]*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--api-cors-header**=[=*API-CORS-HEADER*]]
|
2016-01-13 03:38:18 +03:00
|
|
|
[**--authorization-plugin**[=*[]*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**-b**|**--bridge**[=*BRIDGE*]]
|
|
|
|
[**--bip**[=*BIP*]]
|
2016-01-07 00:59:01 +03:00
|
|
|
[**--cgroup-parent**[=*[]*]]
|
2015-10-09 19:04:34 +03:00
|
|
|
[**--cluster-store**[=*[]*]]
|
|
|
|
[**--cluster-advertise**[=*[]*]]
|
|
|
|
[**--cluster-store-opt**[=*map[]*]]
|
2015-12-11 02:35:10 +03:00
|
|
|
[**--config-file**[=*/etc/docker/daemon.json*]]
|
2016-03-28 14:47:24 +03:00
|
|
|
[**--containerd**[=*SOCKET-PATH*]]
|
2016-11-22 09:17:24 +03:00
|
|
|
[**--data-root**[=*/var/lib/docker*]]
|
2015-12-23 17:37:06 +03:00
|
|
|
[**-D**|**--debug**]
|
2019-07-30 20:10:03 +03:00
|
|
|
[**--default-cgroupns-mode**[=*host*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--default-gateway**[=*DEFAULT-GATEWAY*]]
|
|
|
|
[**--default-gateway-v6**[=*DEFAULT-GATEWAY-V6*]]
|
2018-01-19 03:59:39 +03:00
|
|
|
[**--default-address-pool**[=*DEFAULT-ADDRESS-POOL*]]
|
2016-12-17 17:01:59 +03:00
|
|
|
[**--default-runtime**[=*runc*]]
|
2017-07-21 00:42:51 +03:00
|
|
|
[**--default-ipc-mode**=*MODE*]
|
2016-12-25 12:11:12 +03:00
|
|
|
[**--default-shm-size**[=*64MiB*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--default-ulimit**[=*[]*]]
|
|
|
|
[**--dns**[=*[]*]]
|
2015-09-29 19:31:51 +03:00
|
|
|
[**--dns-opt**[=*[]*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--dns-search**[=*[]*]]
|
|
|
|
[**--exec-opt**[=*[]*]]
|
|
|
|
[**--exec-root**[=*/var/run/docker*]]
|
2016-10-06 17:09:54 +03:00
|
|
|
[**--experimental**[=*false*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--fixed-cidr**[=*FIXED-CIDR*]]
|
|
|
|
[**--fixed-cidr-v6**[=*FIXED-CIDR-V6*]]
|
|
|
|
[**-G**|**--group**[=*docker*]]
|
|
|
|
[**-H**|**--host**[=*[]*]]
|
|
|
|
[**--help**]
|
|
|
|
[**--icc**[=*true*]]
|
2016-06-28 00:38:47 +03:00
|
|
|
[**--init**[=*false*]]
|
2016-09-27 13:51:42 +03:00
|
|
|
[**--init-path**[=*""*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--insecure-registry**[=*[]*]]
|
|
|
|
[**--ip**[=*0.0.0.0*]]
|
|
|
|
[**--ip-forward**[=*true*]]
|
|
|
|
[**--ip-masq**[=*true*]]
|
|
|
|
[**--iptables**[=*true*]]
|
2015-12-23 17:37:06 +03:00
|
|
|
[**--ipv6**]
|
2016-04-15 03:12:02 +03:00
|
|
|
[**--isolation**[=*default*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**-l**|**--log-level**[=*info*]]
|
|
|
|
[**--label**[=*[]*]]
|
2016-06-02 21:10:55 +03:00
|
|
|
[**--live-restore**[=*false*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--log-driver**[=*json-file*]]
|
|
|
|
[**--log-opt**[=*map[]*]]
|
|
|
|
[**--mtu**[=*0*]]
|
2016-05-06 07:45:55 +03:00
|
|
|
[**--max-concurrent-downloads**[=*3*]]
|
|
|
|
[**--max-concurrent-uploads**[=*5*]]
|
2019-10-14 14:33:37 +03:00
|
|
|
[**--max-download-attempts**[=*5*]]
|
2017-11-08 20:13:11 +03:00
|
|
|
[**--node-generic-resources**[=*[]*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**-p**|**--pidfile**[=*/var/run/docker.pid*]]
|
2015-12-13 13:10:41 +03:00
|
|
|
[**--raw-logs**]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--registry-mirror**[=*[]*]]
|
|
|
|
[**-s**|**--storage-driver**[=*STORAGE-DRIVER*]]
|
2016-09-02 16:20:54 +03:00
|
|
|
[**--seccomp-profile**[=*SECCOMP-PROFILE-PATH*]]
|
2015-12-23 17:37:06 +03:00
|
|
|
[**--selinux-enabled**]
|
2016-05-27 00:07:30 +03:00
|
|
|
[**--shutdown-timeout**[=*15*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--storage-opt**[=*[]*]]
|
2016-07-21 20:40:19 +03:00
|
|
|
[**--swarm-default-advertise-addr**[=*IP|INTERFACE*]]
|
2015-12-23 17:37:06 +03:00
|
|
|
[**--tls**]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--tlscacert**[=*~/.docker/ca.pem*]]
|
|
|
|
[**--tlscert**[=*~/.docker/cert.pem*]]
|
|
|
|
[**--tlskey**[=*~/.docker/key.pem*]]
|
2015-12-23 17:37:06 +03:00
|
|
|
[**--tlsverify**]
|
2015-09-17 17:07:22 +03:00
|
|
|
[**--userland-proxy**[=*true*]]
|
2016-09-24 16:44:25 +03:00
|
|
|
[**--userland-proxy-path**[=*""*]]
|
2016-01-08 18:07:46 +03:00
|
|
|
[**--userns-remap**[=*default*]]
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
# DESCRIPTION
|
2016-11-15 16:46:25 +03:00
|
|
|
**dockerd** is used for starting the Docker daemon (i.e., to command the daemon
|
|
|
|
to manage images, containers etc). So **dockerd** is a server, as a daemon.
|
2016-04-28 09:55:22 +03:00
|
|
|
|
|
|
|
To run the Docker daemon you can specify **dockerd**.
|
|
|
|
You can check the daemon options using **dockerd --help**.
|
2016-11-15 16:46:25 +03:00
|
|
|
Daemon options should be specified after the **dockerd** keyword in the
|
|
|
|
following format.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
**dockerd [OPTIONS]**
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
2016-07-02 17:22:23 +03:00
|
|
|
**--add-runtime**=[]
|
2016-12-17 17:01:59 +03:00
|
|
|
Runtimes can be registered with the daemon either via the
|
|
|
|
configuration file or using the `--add-runtime` command line argument.
|
|
|
|
|
|
|
|
The following is an example adding 2 runtimes via the configuration:
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"default-runtime": "runc",
|
|
|
|
"runtimes": {
|
|
|
|
"runc": {
|
|
|
|
"path": "runc"
|
|
|
|
},
|
|
|
|
"custom": {
|
|
|
|
"path": "/usr/local/bin/my-runc-replacement",
|
|
|
|
"runtimeArgs": [
|
|
|
|
"--debug"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
This is the same example via the command line:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ sudo dockerd --add-runtime runc=runc --add-runtime custom=/usr/local/bin/my-runc-replacement
|
|
|
|
```
|
|
|
|
|
|
|
|
**Note**: defining runtime arguments via the command line is not supported.
|
2016-07-02 17:22:23 +03:00
|
|
|
|
2017-05-10 00:00:31 +03:00
|
|
|
**--allow-nondistributable-artifacts**=[]
|
|
|
|
Push nondistributable artifacts to the specified registries.
|
|
|
|
|
|
|
|
List can contain elements with CIDR notation to specify a whole subnet.
|
|
|
|
|
|
|
|
This option is useful when pushing images containing nondistributable
|
|
|
|
artifacts to a registry on an air-gapped network so hosts on that network can
|
|
|
|
pull the images without connecting to another server.
|
|
|
|
|
|
|
|
**Warning**: Nondistributable artifacts typically have restrictions on how
|
|
|
|
and where they can be distributed and shared. Only use this feature to push
|
|
|
|
artifacts to private registries and ensure that you are in compliance with
|
|
|
|
any terms that cover redistributing nondistributable artifacts.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**--api-cors-header**=""
|
2016-11-15 22:45:20 +03:00
|
|
|
Set CORS headers in the Engine API. Default is cors disabled. Give urls like
|
2016-11-15 16:46:25 +03:00
|
|
|
"http://foo, http://bar, ...". Give "*" to allow all.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-01-13 03:38:18 +03:00
|
|
|
**--authorization-plugin**=""
|
2015-12-10 13:53:27 +03:00
|
|
|
Set authorization plugins to load
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**-b**, **--bridge**=""
|
2016-11-15 16:46:25 +03:00
|
|
|
Attach containers to a pre\-existing network bridge; use 'none' to disable
|
|
|
|
container networking
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
**--bip**=""
|
2016-11-15 16:46:25 +03:00
|
|
|
Use the provided CIDR notation address for the dynamically created bridge
|
|
|
|
(docker0); Mutually exclusive of \-b
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2015-12-07 20:55:33 +03:00
|
|
|
**--cgroup-parent**=""
|
2016-11-15 16:46:25 +03:00
|
|
|
Set parent cgroup for all containers. Default is "/docker" for fs cgroup
|
|
|
|
driver and "system.slice" for systemd cgroup driver.
|
2015-12-07 20:55:33 +03:00
|
|
|
|
2015-10-09 19:04:34 +03:00
|
|
|
**--cluster-store**=""
|
|
|
|
URL of the distributed storage backend
|
|
|
|
|
|
|
|
**--cluster-advertise**=""
|
2016-11-15 16:46:25 +03:00
|
|
|
Specifies the 'host:port' or `interface:port` combination that this
|
|
|
|
particular daemon instance should use when advertising itself to the cluster.
|
|
|
|
The daemon is reached through this value.
|
2015-10-09 19:04:34 +03:00
|
|
|
|
|
|
|
**--cluster-store-opt**=""
|
|
|
|
Specifies options for the Key/Value store.
|
|
|
|
|
2015-12-11 02:35:10 +03:00
|
|
|
**--config-file**="/etc/docker/daemon.json"
|
|
|
|
Specifies the JSON file path to load the configuration from.
|
|
|
|
|
2016-03-28 14:47:24 +03:00
|
|
|
**--containerd**=""
|
|
|
|
Path to containerd socket.
|
|
|
|
|
2016-11-22 09:17:24 +03:00
|
|
|
**--data-root**=""
|
|
|
|
Path to the directory used to store persisted Docker data such as
|
|
|
|
configuration for resources, swarm cluster state, and filesystem data for
|
|
|
|
images, containers, and local volumes. Default is `/var/lib/docker`.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**-D**, **--debug**=*true*|*false*
|
|
|
|
Enable debug mode. Default is false.
|
|
|
|
|
2019-07-30 20:10:03 +03:00
|
|
|
**--default-cgroupns-mode**="**host**|**private**"
|
|
|
|
Set the default cgroup namespace mode for newly created containers. The argument
|
|
|
|
can either be **host** or **private**. If unset, this defaults to `host`.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**--default-gateway**=""
|
2016-11-15 16:46:25 +03:00
|
|
|
IPv4 address of the container default gateway; this address must be part of
|
|
|
|
the bridge subnet (which is defined by \-b or \--bip)
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
**--default-gateway-v6**=""
|
|
|
|
IPv6 address of the container default gateway
|
|
|
|
|
2018-01-19 03:59:39 +03:00
|
|
|
**--default-address-pool**=""
|
|
|
|
Default address pool from which IPAM driver selects a subnet for the networks.
|
|
|
|
Example: base=172.30.0.0/16,size=24 will set the default
|
|
|
|
address pools for the selected scope networks to {172.30.[0-255].0/24}
|
|
|
|
|
2016-12-17 17:01:59 +03:00
|
|
|
**--default-runtime**="runc"
|
|
|
|
Set default runtime if there're more than one specified by `--add-runtime`.
|
|
|
|
|
2017-07-21 00:42:51 +03:00
|
|
|
**--default-ipc-mode**="**private**|**shareable**"
|
|
|
|
Set the default IPC mode for newly created containers. The argument
|
|
|
|
can either be **private** or **shareable**.
|
|
|
|
|
2016-12-25 12:11:12 +03:00
|
|
|
**--default-shm-size**=*64MiB*
|
|
|
|
Set the daemon-wide default shm size for containers. Default is `64MiB`.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**--default-ulimit**=[]
|
2016-07-16 02:52:59 +03:00
|
|
|
Default ulimits for containers.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
**--dns**=""
|
|
|
|
Force Docker to use specific DNS servers
|
|
|
|
|
2015-09-29 19:31:51 +03:00
|
|
|
**--dns-opt**=""
|
|
|
|
DNS options to use.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**--dns-search**=[]
|
|
|
|
DNS search domains to use.
|
|
|
|
|
|
|
|
**--exec-opt**=[]
|
2016-03-18 22:43:17 +03:00
|
|
|
Set runtime execution options. See RUNTIME EXECUTION OPTIONS.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
**--exec-root**=""
|
2016-11-15 16:46:25 +03:00
|
|
|
Path to use as the root of the Docker execution state files. Default is
|
|
|
|
`/var/run/docker`.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-10-06 17:09:54 +03:00
|
|
|
**--experimental**=""
|
|
|
|
Enable the daemon experimental features.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**--fixed-cidr**=""
|
2016-11-15 16:46:25 +03:00
|
|
|
IPv4 subnet for fixed IPs (e.g., 10.20.0.0/16); this subnet must be nested in
|
|
|
|
the bridge subnet (which is defined by \-b or \-\-bip).
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
**--fixed-cidr-v6**=""
|
|
|
|
IPv6 subnet for global IPv6 addresses (e.g., 2a00:1450::/64)
|
|
|
|
|
|
|
|
**-G**, **--group**=""
|
|
|
|
Group to assign the unix socket specified by -H when running in daemon mode.
|
|
|
|
use '' (the empty string) to disable setting of a group. Default is `docker`.
|
|
|
|
|
2015-11-10 04:33:55 +03:00
|
|
|
**-H**, **--host**=[*unix:///var/run/docker.sock*]: tcp://[host:port] to bind or
|
2015-09-17 17:07:22 +03:00
|
|
|
unix://[/path/to/socket] to use.
|
|
|
|
The socket(s) to bind to in daemon mode specified using one or more
|
|
|
|
tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.
|
|
|
|
|
|
|
|
**--help**
|
|
|
|
Print usage statement
|
|
|
|
|
|
|
|
**--icc**=*true*|*false*
|
2016-11-15 16:46:25 +03:00
|
|
|
Allow unrestricted inter\-container and Docker daemon host communication. If
|
|
|
|
disabled, containers can still be linked together using the **--link** option
|
|
|
|
(see **docker-run(1)**). Default is true.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-06-28 00:38:47 +03:00
|
|
|
**--init**
|
2016-11-15 16:46:25 +03:00
|
|
|
Run an init process inside containers for signal forwarding and process
|
|
|
|
reaping.
|
2016-06-28 00:38:47 +03:00
|
|
|
|
2016-09-27 13:51:42 +03:00
|
|
|
**--init-path**
|
2016-11-15 08:59:47 +03:00
|
|
|
Path to the docker-init binary.
|
2016-09-27 13:51:42 +03:00
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**--insecure-registry**=[]
|
2016-11-15 16:46:25 +03:00
|
|
|
Enable insecure registry communication, i.e., enable un-encrypted and/or
|
|
|
|
untrusted communication.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
List of insecure registries can contain an element with CIDR notation to
|
|
|
|
specify a whole subnet. Insecure registries accept HTTP and/or accept HTTPS
|
|
|
|
with certificates from unknown CAs.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Enabling `--insecure-registry` is useful when running a local registry.
|
|
|
|
However, because its use creates security vulnerabilities it should ONLY be
|
|
|
|
enabled for testing purposes. For increased security, users should add their
|
|
|
|
CA to their system's list of trusted CAs instead of using
|
|
|
|
`--insecure-registry`.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
**--ip**=""
|
|
|
|
Default IP address to use when binding container ports. Default is `0.0.0.0`.
|
|
|
|
|
|
|
|
**--ip-forward**=*true*|*false*
|
2016-11-15 16:46:25 +03:00
|
|
|
Enables IP forwarding on the Docker host. The default is `true`. This flag
|
|
|
|
interacts with the IP forwarding setting on your host system's kernel. If
|
|
|
|
your system has IP forwarding disabled, this setting enables it. If your
|
|
|
|
system has IP forwarding enabled, setting this flag to `--ip-forward=false`
|
|
|
|
has no effect.
|
|
|
|
|
|
|
|
This setting will also enable IPv6 forwarding if you have both
|
|
|
|
`--ip-forward=true` and `--fixed-cidr-v6` set. Note that this may reject
|
|
|
|
Router Advertisements and interfere with the host's existing IPv6
|
|
|
|
configuration. For more information, please consult the documentation about
|
|
|
|
"Advanced Networking - IPv6".
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
**--ip-masq**=*true*|*false*
|
|
|
|
Enable IP masquerading for bridge's IP range. Default is true.
|
|
|
|
|
|
|
|
**--iptables**=*true*|*false*
|
|
|
|
Enable Docker's addition of iptables rules. Default is true.
|
|
|
|
|
|
|
|
**--ipv6**=*true*|*false*
|
2016-11-15 16:46:25 +03:00
|
|
|
Enable IPv6 support. Default is false. Docker will create an IPv6-enabled
|
|
|
|
bridge with address fe80::1 which will allow you to create IPv6-enabled
|
|
|
|
containers. Use together with `--fixed-cidr-v6` to provide globally routable
|
|
|
|
IPv6 addresses. IPv6 forwarding will be enabled if not used with
|
|
|
|
`--ip-forward=false`. This may collide with your host's current IPv6
|
|
|
|
settings. For more information please consult the documentation about
|
|
|
|
"Advanced Networking - IPv6".
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-04-15 03:12:02 +03:00
|
|
|
**--isolation**="*default*"
|
2016-11-15 16:46:25 +03:00
|
|
|
Isolation specifies the type of isolation technology used by containers.
|
|
|
|
Note that the default on Windows server is `process`, and the default on
|
|
|
|
Windows client is `hyperv`. Linux only supports `default`.
|
2016-04-15 03:12:02 +03:00
|
|
|
|
2015-11-10 04:33:55 +03:00
|
|
|
**-l**, **--log-level**="*debug*|*info*|*warn*|*error*|*fatal*"
|
2015-09-17 17:07:22 +03:00
|
|
|
Set the logging level. Default is `info`.
|
|
|
|
|
|
|
|
**--label**="[]"
|
|
|
|
Set key=value labels to the daemon (displayed in `docker info`)
|
|
|
|
|
2016-06-02 21:10:55 +03:00
|
|
|
**--live-restore**=*false*
|
2016-11-15 16:46:25 +03:00
|
|
|
Enable live restore of running containers when the daemon starts so that they
|
|
|
|
are not restarted. This option is applicable only for docker daemon running
|
|
|
|
on Linux host.
|
2016-06-02 21:10:55 +03:00
|
|
|
|
2015-12-18 20:43:32 +03:00
|
|
|
**--log-driver**="*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*splunk*|*etwlogs*|*gcplogs*|*none*"
|
2015-09-17 17:07:22 +03:00
|
|
|
Default driver for container logs. Default is `json-file`.
|
|
|
|
**Warning**: `docker logs` command works only for `json-file` logging driver.
|
|
|
|
|
|
|
|
**--log-opt**=[]
|
|
|
|
Logging driver specific options.
|
|
|
|
|
2015-11-10 04:33:55 +03:00
|
|
|
**--mtu**=*0*
|
2015-09-17 17:07:22 +03:00
|
|
|
Set the containers network mtu. Default is `0`.
|
|
|
|
|
2016-05-06 07:45:55 +03:00
|
|
|
**--max-concurrent-downloads**=*3*
|
|
|
|
Set the max concurrent downloads for each pull. Default is `3`.
|
|
|
|
|
|
|
|
**--max-concurrent-uploads**=*5*
|
|
|
|
Set the max concurrent uploads for each push. Default is `5`.
|
|
|
|
|
2019-10-14 14:33:37 +03:00
|
|
|
**--max-download-attempts**=*5*
|
|
|
|
Set the max download attempts for each pull. Default is `5`.
|
|
|
|
|
2017-11-08 20:13:11 +03:00
|
|
|
**--node-generic-resources**=*[]*
|
|
|
|
Advertise user-defined resource. Default is `[]`.
|
|
|
|
Use this if your swarm cluster has some nodes with custom
|
|
|
|
resources (e.g: NVIDIA GPU, SSD, ...) and you need your services to land on
|
|
|
|
nodes advertising these resources.
|
|
|
|
Usage example: `--node-generic-resources "NVIDIA-GPU=UUID1"
|
|
|
|
--node-generic-resources "NVIDIA-GPU=UUID2"`
|
|
|
|
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**-p**, **--pidfile**=""
|
|
|
|
Path to use for daemon PID file. Default is `/var/run/docker.pid`
|
|
|
|
|
2015-12-13 13:10:41 +03:00
|
|
|
**--raw-logs**
|
2016-11-15 16:46:25 +03:00
|
|
|
Output daemon logs in full timestamp format without ANSI coloring. If this
|
|
|
|
flag is not set, the daemon outputs condensed, colorized logs if a terminal
|
|
|
|
is detected, or full ("raw") output otherwise.
|
2015-12-13 13:10:41 +03:00
|
|
|
|
2015-11-10 04:33:55 +03:00
|
|
|
**--registry-mirror**=*<scheme>://<host>*
|
2016-11-15 16:46:25 +03:00
|
|
|
Prepend a registry mirror to be used for image pulls. May be specified
|
|
|
|
multiple times.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
**-s**, **--storage-driver**=""
|
|
|
|
Force the Docker runtime to use a specific storage driver.
|
|
|
|
|
2016-09-02 16:20:54 +03:00
|
|
|
**--seccomp-profile**=""
|
|
|
|
Path to seccomp profile.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**--selinux-enabled**=*true*|*false*
|
2016-08-11 16:41:26 +03:00
|
|
|
Enable selinux support. Default is false.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-05-27 00:07:30 +03:00
|
|
|
**--shutdown-timeout**=*15*
|
|
|
|
Set the shutdown timeout value in seconds. Default is `15`.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**--storage-opt**=[]
|
|
|
|
Set storage driver options. See STORAGE DRIVER OPTIONS.
|
|
|
|
|
2016-07-21 20:40:19 +03:00
|
|
|
**--swarm-default-advertise-addr**=*IP|INTERFACE*
|
2016-11-15 16:46:25 +03:00
|
|
|
Set default address or interface for swarm to advertise as its
|
|
|
|
externally-reachable address to other cluster members. This can be a
|
|
|
|
hostname, an IP address, or an interface such as `eth0`. A port cannot be
|
|
|
|
specified with this option.
|
2016-07-01 04:07:35 +03:00
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
**--tls**=*true*|*false*
|
|
|
|
Use TLS; implied by --tlsverify. Default is false.
|
|
|
|
|
2015-11-10 04:33:55 +03:00
|
|
|
**--tlscacert**=*~/.docker/ca.pem*
|
2015-09-17 17:07:22 +03:00
|
|
|
Trust certs signed only by this CA.
|
|
|
|
|
2015-11-10 04:33:55 +03:00
|
|
|
**--tlscert**=*~/.docker/cert.pem*
|
2015-09-17 17:07:22 +03:00
|
|
|
Path to TLS certificate file.
|
|
|
|
|
2015-11-10 04:33:55 +03:00
|
|
|
**--tlskey**=*~/.docker/key.pem*
|
2015-09-17 17:07:22 +03:00
|
|
|
Path to TLS key file.
|
|
|
|
|
|
|
|
**--tlsverify**=*true*|*false*
|
|
|
|
Use TLS and verify the remote (daemon: verify client, client: verify daemon).
|
|
|
|
Default is false.
|
|
|
|
|
|
|
|
**--userland-proxy**=*true*|*false*
|
2016-11-15 16:46:25 +03:00
|
|
|
Rely on a userland proxy implementation for inter-container and
|
|
|
|
outside-to-container loopback communications. Default is true.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-09-24 16:44:25 +03:00
|
|
|
**--userland-proxy-path**=""
|
|
|
|
Path to the userland proxy binary.
|
|
|
|
|
2016-01-08 18:07:46 +03:00
|
|
|
**--userns-remap**=*default*|*uid:gid*|*user:group*|*user*|*uid*
|
2016-11-15 16:46:25 +03:00
|
|
|
Enable user namespaces for containers on the daemon. Specifying "default"
|
|
|
|
will cause a new user and group to be created to handle UID and GID range
|
|
|
|
remapping for the user namespace mappings used for contained processes.
|
|
|
|
Specifying a user (or uid) and optionally a group (or gid) will cause the
|
|
|
|
daemon to lookup the user and group's subordinate ID ranges for use as the
|
|
|
|
user namespace mappings for contained processes.
|
2016-01-08 18:07:46 +03:00
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
# STORAGE DRIVER OPTIONS
|
|
|
|
|
|
|
|
Docker uses storage backends (known as "graphdrivers" in the Docker
|
|
|
|
internals) to create writable containers from images. Many of these
|
|
|
|
backends use operating system level technologies and can be
|
|
|
|
configured.
|
|
|
|
|
2016-02-19 09:13:52 +03:00
|
|
|
Specify options to the storage backend with **--storage-opt** flags. The
|
2016-03-24 04:14:38 +03:00
|
|
|
backends that currently take options are *devicemapper*, *zfs* and *btrfs*.
|
|
|
|
Options for *devicemapper* are prefixed with *dm*, options for *zfs*
|
|
|
|
start with *zfs* and options for *btrfs* start with *btrfs*.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
Specifically for devicemapper, the default is a "loopback" model which
|
|
|
|
requires no pre-configuration, but is extremely inefficient. Do not
|
|
|
|
use it in production.
|
|
|
|
|
|
|
|
To make the best use of Docker with the devicemapper backend, you must
|
|
|
|
have a recent version of LVM. Use `lvm` to create a thin pool; for
|
|
|
|
more information see `man lvmthin`. Then, use `--storage-opt
|
|
|
|
dm.thinpooldev` to tell the Docker engine to use that pool for
|
|
|
|
allocating images and container snapshots.
|
|
|
|
|
2016-02-23 11:09:44 +03:00
|
|
|
## Devicemapper options
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.thinpooldev
|
|
|
|
|
|
|
|
Specifies a custom block storage device to use for the thin pool.
|
|
|
|
|
2016-04-12 22:20:03 +03:00
|
|
|
If using a block device for device mapper storage, it is best to use `lvm`
|
|
|
|
to create and manage the thin-pool volume. This volume is then handed to Docker
|
|
|
|
to exclusively create snapshot volumes needed for images and containers.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-04-12 22:20:03 +03:00
|
|
|
Managing the thin-pool outside of Engine makes for the most feature-rich
|
|
|
|
method of having Docker utilize device mapper thin provisioning as the
|
|
|
|
backing storage for Docker containers. The highlights of the lvm-based
|
|
|
|
thin-pool management feature include: automatic or interactive thin-pool
|
|
|
|
resize support, dynamically changing thin-pool features, automatic thinp
|
|
|
|
metadata checking when lvm activates the thin-pool, etc.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-04-12 22:20:03 +03:00
|
|
|
As a fallback if no thin pool is provided, loopback files are
|
|
|
|
created. Loopback is very slow, but can be used without any
|
|
|
|
pre-configuration of storage. It is strongly recommended that you do
|
|
|
|
not use loopback in production. Ensure your Engine daemon has a
|
|
|
|
`--storage-opt dm.thinpooldev` argument provided.
|
|
|
|
|
|
|
|
Example use:
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
$ dockerd \
|
2016-04-12 22:20:03 +03:00
|
|
|
--storage-opt dm.thinpooldev=/dev/mapper/thin-pool
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2017-02-16 23:33:03 +03:00
|
|
|
#### dm.directlvm_device
|
|
|
|
|
|
|
|
As an alternative to manually creating a thin pool as above, Docker can
|
|
|
|
automatically configure a block device for you.
|
|
|
|
|
|
|
|
Example use:
|
|
|
|
|
|
|
|
$ dockerd \
|
|
|
|
--storage-opt dm.directlvm_device=/dev/xvdf
|
|
|
|
|
|
|
|
##### dm.thinp_percent
|
|
|
|
|
|
|
|
Sets the percentage of passed in block device to use for storage.
|
|
|
|
|
|
|
|
###### Example:
|
|
|
|
|
|
|
|
$ sudo dockerd \
|
|
|
|
--storage-opt dm.thinp_percent=95
|
|
|
|
|
|
|
|
##### `dm.thinp_metapercent`
|
|
|
|
|
|
|
|
Sets the percentage of the passed in block device to use for metadata storage.
|
|
|
|
|
|
|
|
###### Example:
|
|
|
|
|
|
|
|
$ sudo dockerd \
|
|
|
|
--storage-opt dm.thinp_metapercent=1
|
|
|
|
|
|
|
|
##### dm.thinp_autoextend_threshold
|
|
|
|
|
|
|
|
Sets the value of the percentage of space used before `lvm` attempts to
|
|
|
|
autoextend the available space [100 = disabled]
|
|
|
|
|
|
|
|
###### Example:
|
|
|
|
|
|
|
|
$ sudo dockerd \
|
|
|
|
--storage-opt dm.thinp_autoextend_threshold=80
|
|
|
|
|
|
|
|
##### dm.thinp_autoextend_percent
|
|
|
|
|
2017-10-31 13:21:09 +03:00
|
|
|
Sets the value percentage value to increase the thin pool by when `lvm`
|
2017-02-16 23:33:03 +03:00
|
|
|
attempts to autoextend the available space [100 = disabled]
|
|
|
|
|
|
|
|
###### Example:
|
|
|
|
|
|
|
|
$ sudo dockerd \
|
|
|
|
--storage-opt dm.thinp_autoextend_percent=20
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
#### dm.basesize
|
|
|
|
|
|
|
|
Specifies the size to use when creating the base device, which limits
|
2016-01-12 21:44:13 +03:00
|
|
|
the size of images and containers. The default value is 10G. Note,
|
|
|
|
thin devices are inherently "sparse", so a 10G device which is mostly
|
|
|
|
empty doesn't use 10 GB of space on the pool. However, the filesystem
|
2015-09-17 17:07:22 +03:00
|
|
|
will use more space for base images the larger the device
|
|
|
|
is.
|
|
|
|
|
2016-01-12 21:44:13 +03:00
|
|
|
The base device size can be increased at daemon restart which will allow
|
2016-03-18 22:43:17 +03:00
|
|
|
all future images and containers (based on those new images) to be of the
|
2016-01-12 21:44:13 +03:00
|
|
|
new base device size.
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt dm.basesize=50G`
|
2016-01-12 21:44:13 +03:00
|
|
|
|
2016-03-18 22:43:17 +03:00
|
|
|
This will increase the base device size to 50G. The Docker daemon will throw an
|
|
|
|
error if existing base device size is larger than 50G. A user can use
|
2016-01-12 21:44:13 +03:00
|
|
|
this option to expand the base device size however shrinking is not permitted.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
This value affects the system-wide "base" empty filesystem that may already
|
|
|
|
be initialized and inherited by pulled images. Typically, a change to this
|
|
|
|
value requires additional steps to take effect:
|
|
|
|
|
|
|
|
$ sudo service docker stop
|
|
|
|
$ sudo rm -rf /var/lib/docker
|
|
|
|
$ sudo service docker start
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt dm.basesize=20G`
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.fs
|
|
|
|
|
|
|
|
Specifies the filesystem type to use for the base device. The
|
|
|
|
supported options are `ext4` and `xfs`. The default is `ext4`.
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt dm.fs=xfs`
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.mkfsarg
|
|
|
|
|
|
|
|
Specifies extra mkfs arguments to be used when creating the base device.
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt "dm.mkfsarg=-O ^has_journal"`
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.mountopt
|
|
|
|
|
|
|
|
Specifies extra mount options used when mounting the thin devices.
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt dm.mountopt=nodiscard`
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.use_deferred_removal
|
|
|
|
|
|
|
|
Enables use of deferred device removal if `libdm` and the kernel driver
|
|
|
|
support the mechanism.
|
|
|
|
|
|
|
|
Deferred device removal means that if device is busy when devices are
|
|
|
|
being removed/deactivated, then a deferred removal is scheduled on
|
|
|
|
device. And devices automatically go away when last user of the device
|
|
|
|
exits.
|
|
|
|
|
|
|
|
For example, when a container exits, its associated thin device is removed. If
|
|
|
|
that device has leaked into some other mount namespace and can't be removed,
|
|
|
|
the container exit still succeeds and this option causes the system to schedule
|
2016-11-15 16:46:25 +03:00
|
|
|
the device for deferred removal. It does not wait in a loop trying to remove a
|
|
|
|
busy device.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt dm.use_deferred_removal=true`
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2015-10-07 00:37:21 +03:00
|
|
|
#### dm.use_deferred_deletion
|
|
|
|
|
|
|
|
Enables use of deferred device deletion for thin pool devices. By default,
|
|
|
|
thin pool device deletion is synchronous. Before a container is deleted, the
|
|
|
|
Docker daemon removes any associated devices. If the storage driver can not
|
|
|
|
remove a device, the container deletion fails and daemon returns.
|
|
|
|
|
|
|
|
`Error deleting container: Error response from daemon: Cannot destroy container`
|
|
|
|
|
|
|
|
To avoid this failure, enable both deferred device deletion and deferred
|
|
|
|
device removal on the daemon.
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
`dockerd --storage-opt dm.use_deferred_deletion=true --storage-opt dm.use_deferred_removal=true`
|
2015-10-07 00:37:21 +03:00
|
|
|
|
|
|
|
With these two options enabled, if a device is busy when the driver is
|
|
|
|
deleting a container, the driver marks the device as deleted. Later, when the
|
|
|
|
device isn't in use, the driver deletes it.
|
|
|
|
|
|
|
|
In general it should be safe to enable this option by default. It will help
|
|
|
|
when unintentional leaking of mount point happens across multiple mount
|
|
|
|
namespaces.
|
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
#### dm.loopdatasize
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
**Note**: This option configures devicemapper loopback, which should not be
|
|
|
|
used in production.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Specifies the size to use when creating the loopback file for the "data" device
|
|
|
|
which is used for the thin pool. The default size is 100G. The file is sparse,
|
|
|
|
so it will not initially take up this much space.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt dm.loopdatasize=200G`
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.loopmetadatasize
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
**Note**: This option configures devicemapper loopback, which should not be
|
|
|
|
used in production.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Specifies the size to use when creating the loopback file for the "metadata"
|
|
|
|
device which is used for the thin pool. The default size is 2G. The file is
|
|
|
|
sparse, so it will not initially take up this much space.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt dm.loopmetadatasize=4G`
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.datadev
|
|
|
|
|
|
|
|
(Deprecated, use `dm.thinpooldev`)
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Specifies a custom blockdevice to use for data for a Docker-managed thin pool.
|
|
|
|
It is better to use `dm.thinpooldev` - see the documentation for it above for
|
|
|
|
discussion of the advantages.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.metadatadev
|
|
|
|
|
|
|
|
(Deprecated, use `dm.thinpooldev`)
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Specifies a custom blockdevice to use for metadata for a Docker-managed thin
|
|
|
|
pool. See `dm.datadev` for why this is deprecated.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.blocksize
|
|
|
|
|
|
|
|
Specifies a custom blocksize to use for the thin pool. The default
|
|
|
|
blocksize is 64K.
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt dm.blocksize=512K`
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.blkdiscard
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Enables or disables the use of `blkdiscard` when removing devicemapper devices.
|
|
|
|
This is disabled by default due to the additional latency, but as a special
|
|
|
|
case with loopback devices it will be enabled, in order to re-sparsify the
|
|
|
|
loopback file on image/container removal.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Disabling this on loopback can lead to *much* faster container removal times,
|
|
|
|
but it also prevents the space used in `/var/lib/docker` directory from being
|
|
|
|
returned to the system for other use when containers are removed.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd --storage-opt dm.blkdiscard=false`
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
#### dm.override_udev_sync_check
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
By default, the devicemapper backend attempts to synchronize with the `udev`
|
|
|
|
device manager for the Linux kernel. This option allows disabling that
|
|
|
|
synchronization, to continue even though the configuration may be buggy.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
|
|
|
To view the `udev` sync support of a Docker daemon that is using the
|
|
|
|
`devicemapper` driver, run:
|
|
|
|
|
|
|
|
$ docker info
|
|
|
|
[...]
|
|
|
|
Udev Sync Supported: true
|
|
|
|
[...]
|
|
|
|
|
|
|
|
When `udev` sync support is `true`, then `devicemapper` and `udev` can
|
|
|
|
coordinate the activation and deactivation of devices for containers.
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
When `udev` sync support is `false`, a race condition occurs between the
|
|
|
|
`devicemapper` and `udev` during create and cleanup. The race condition results
|
|
|
|
in errors and failures. (For information on these failures, see
|
2015-09-17 17:07:22 +03:00
|
|
|
[docker#4036](https://github.com/docker/docker/issues/4036))
|
|
|
|
|
|
|
|
To allow the `docker` daemon to start, regardless of whether `udev` sync is
|
|
|
|
`false`, set `dm.override_udev_sync_check` to true:
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
$ dockerd --storage-opt dm.override_udev_sync_check=true
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
When this value is `true`, the driver continues and simply warns you the errors
|
|
|
|
are happening.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
**Note**: The ideal is to pursue a `docker` daemon and environment that does
|
|
|
|
support synchronizing with `udev`. For further discussion on this topic, see
|
2015-09-17 17:07:22 +03:00
|
|
|
[docker#4036](https://github.com/docker/docker/issues/4036).
|
2016-11-15 16:46:25 +03:00
|
|
|
Otherwise, set this flag for migrating existing Docker daemons to a daemon with
|
|
|
|
a supported environment.
|
2015-09-17 17:07:22 +03:00
|
|
|
|
2016-03-07 23:27:39 +03:00
|
|
|
#### dm.min_free_space
|
|
|
|
|
2016-04-12 22:20:03 +03:00
|
|
|
Specifies the min free space percent in a thin pool require for new device
|
2016-03-07 23:27:39 +03:00
|
|
|
creation to succeed. This check applies to both free data space as well
|
|
|
|
as free metadata space. Valid values are from 0% - 99%. Value 0% disables
|
2016-04-12 22:20:03 +03:00
|
|
|
free space checking logic. If user does not specify a value for this option,
|
|
|
|
the Engine uses a default value of 10%.
|
|
|
|
|
|
|
|
Whenever a new a thin pool device is created (during `docker pull` or during
|
2016-11-15 16:46:25 +03:00
|
|
|
container creation), the Engine checks if the minimum free space is available.
|
|
|
|
If the space is unavailable, then device creation fails and any relevant
|
|
|
|
`docker` operation fails.
|
2016-04-12 22:20:03 +03:00
|
|
|
|
|
|
|
To recover from this error, you must create more free space in the thin pool to
|
2016-11-15 16:46:25 +03:00
|
|
|
recover from the error. You can create free space by deleting some images and
|
|
|
|
containers from tge thin pool. You can also add more storage to the thin pool.
|
2016-04-12 22:20:03 +03:00
|
|
|
|
|
|
|
To add more space to an LVM (logical volume management) thin pool, just add
|
|
|
|
more storage to the group container thin pool; this should automatically
|
|
|
|
resolve any errors. If your configuration uses loop devices, then stop the
|
|
|
|
Engine daemon, grow the size of loop files and restart the daemon to resolve
|
|
|
|
the issue.
|
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use:: `dockerd --storage-opt dm.min_free_space=10%`
|
2016-03-07 23:27:39 +03:00
|
|
|
|
2016-09-26 16:08:23 +03:00
|
|
|
#### dm.xfs_nospace_max_retries
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Specifies the maximum number of retries XFS should attempt to complete IO when
|
|
|
|
ENOSPC (no space) error is returned by underlying storage device.
|
2016-09-26 16:08:23 +03:00
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
By default XFS retries infinitely for IO to finish and this can result in
|
|
|
|
unkillable process. To change this behavior one can set xfs_nospace_max_retries
|
|
|
|
to say 0 and XFS will not retry IO after getting ENOSPC and will shutdown
|
|
|
|
filesystem.
|
2016-09-26 16:08:23 +03:00
|
|
|
|
|
|
|
Example use:
|
|
|
|
|
|
|
|
$ sudo dockerd --storage-opt dm.xfs_nospace_max_retries=0
|
|
|
|
|
2017-07-12 17:38:47 +03:00
|
|
|
##### dm.libdm_log_level
|
|
|
|
|
|
|
|
Specifies the maxmimum libdm log level that will be forwarded to the dockerd
|
|
|
|
log (as specified by --log-level). This option is primarily intended for
|
|
|
|
debugging problems involving libdm. Using values other than the defaults may
|
|
|
|
cause false-positive warnings to be logged.
|
|
|
|
|
|
|
|
Values specified must fall within the range of valid libdm log levels. At the
|
|
|
|
time of writing, the following is the list of libdm log levels as well as their
|
|
|
|
corresponding levels when output by dockerd.
|
|
|
|
|
|
|
|
| libdm Level | Value | --log-level |
|
|
|
|
| ----------- | -----:| ----------- |
|
|
|
|
| _LOG_FATAL | 2 | error |
|
|
|
|
| _LOG_ERR | 3 | error |
|
|
|
|
| _LOG_WARN | 4 | warn |
|
|
|
|
| _LOG_NOTICE | 5 | info |
|
|
|
|
| _LOG_INFO | 6 | info |
|
|
|
|
| _LOG_DEBUG | 7 | debug |
|
|
|
|
|
|
|
|
Example use:
|
|
|
|
|
|
|
|
$ sudo dockerd \
|
|
|
|
--log-level debug \
|
|
|
|
--storage-opt dm.libdm_log_level=7
|
2016-09-26 16:08:23 +03:00
|
|
|
|
2016-03-22 09:50:49 +03:00
|
|
|
## ZFS options
|
|
|
|
|
|
|
|
#### zfs.fsname
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Set zfs filesystem under which docker will create its own datasets. By default
|
|
|
|
docker will pick up the zfs filesystem where docker graph (`/var/lib/docker`)
|
|
|
|
is located.
|
2016-03-22 09:50:49 +03:00
|
|
|
|
2016-04-28 09:55:22 +03:00
|
|
|
Example use: `dockerd -s zfs --storage-opt zfs.fsname=zroot/docker`
|
2016-03-22 09:50:49 +03:00
|
|
|
|
2016-03-24 04:14:38 +03:00
|
|
|
## Btrfs options
|
|
|
|
|
|
|
|
#### btrfs.min_space
|
|
|
|
|
2017-02-16 18:56:53 +03:00
|
|
|
Specifies the minimum size to use when creating the subvolume which is used for
|
2016-11-15 16:46:25 +03:00
|
|
|
containers. If user uses disk quota for btrfs when creating or running a
|
|
|
|
container with **--storage-opt size** option, docker should ensure the **size**
|
|
|
|
cannot be smaller than **btrfs.min_space**.
|
2016-03-24 04:14:38 +03:00
|
|
|
|
|
|
|
Example use: `docker daemon -s btrfs --storage-opt btrfs.min_space=10G`
|
|
|
|
|
2015-10-09 19:04:34 +03:00
|
|
|
# CLUSTER STORE OPTIONS
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
The daemon uses libkv to advertise the node within the cluster. Some Key/Value
|
|
|
|
backends support mutual TLS, and the client TLS settings used by the daemon can
|
|
|
|
be configured using the **--cluster-store-opt** flag, specifying the paths to
|
|
|
|
PEM encoded files.
|
2015-10-09 19:04:34 +03:00
|
|
|
|
|
|
|
#### kv.cacertfile
|
|
|
|
|
|
|
|
Specifies the path to a local file with PEM encoded CA certificates to trust
|
|
|
|
|
|
|
|
#### kv.certfile
|
|
|
|
|
|
|
|
Specifies the path to a local file with a PEM encoded certificate. This
|
2016-11-15 16:46:25 +03:00
|
|
|
certificate is used as the client cert for communication with the Key/Value
|
|
|
|
store.
|
2015-10-09 19:04:34 +03:00
|
|
|
|
|
|
|
#### kv.keyfile
|
|
|
|
|
|
|
|
Specifies the path to a local file with a PEM encoded private key. This
|
2016-11-15 16:46:25 +03:00
|
|
|
private key is used as the client key for communication with the Key/Value
|
|
|
|
store.
|
2015-10-09 19:04:34 +03:00
|
|
|
|
2015-12-10 13:53:27 +03:00
|
|
|
# Access authorization
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
Docker's access authorization can be extended by authorization plugins that
|
|
|
|
your organization can purchase or build themselves. You can install one or more
|
2015-12-10 13:53:27 +03:00
|
|
|
authorization plugins when you start the Docker `daemon` using the
|
2016-01-13 03:38:18 +03:00
|
|
|
`--authorization-plugin=PLUGIN_ID` option.
|
2015-12-10 13:53:27 +03:00
|
|
|
|
|
|
|
```bash
|
2016-04-28 09:55:22 +03:00
|
|
|
dockerd --authorization-plugin=plugin1 --authorization-plugin=plugin2,...
|
2015-12-10 13:53:27 +03:00
|
|
|
```
|
|
|
|
|
2016-11-15 16:46:25 +03:00
|
|
|
The `PLUGIN_ID` value is either the plugin's name or a path to its
|
|
|
|
specification file. The plugin's implementation determines whether you can
|
|
|
|
specify a name or path. Consult with your Docker administrator to get
|
|
|
|
information about the plugins available to you.
|
2015-12-10 13:53:27 +03:00
|
|
|
|
2017-05-01 16:27:42 +03:00
|
|
|
Once a plugin is installed, requests made to the `daemon` through the
|
|
|
|
command line or Docker's Engine API are allowed or denied by the plugin.
|
|
|
|
If you have multiple plugins installed, each plugin, in order, must
|
|
|
|
allow the request for it to complete.
|
2015-12-10 13:53:27 +03:00
|
|
|
|
2018-05-22 16:13:41 +03:00
|
|
|
For information about how to create an authorization plugin, see [access authorization
|
|
|
|
plugin](https://docs.docker.com/engine/extend/plugins_authorization/) section in the
|
2015-12-10 13:53:27 +03:00
|
|
|
Docker extend section of this documentation.
|
|
|
|
|
2016-12-22 14:27:40 +03:00
|
|
|
# RUNTIME EXECUTION OPTIONS
|
|
|
|
|
|
|
|
You can configure the runtime using options specified with the `--exec-opt` flag.
|
|
|
|
All the flag's options have the `native` prefix. A single `native.cgroupdriver`
|
|
|
|
option is available.
|
|
|
|
|
|
|
|
The `native.cgroupdriver` option specifies the management of the container's
|
|
|
|
cgroups. You can only specify `cgroupfs` or `systemd`. If you specify
|
|
|
|
`systemd` and it is not available, the system errors out. If you omit the
|
|
|
|
`native.cgroupdriver` option,` cgroupfs` is used.
|
|
|
|
|
|
|
|
This example sets the `cgroupdriver` to `systemd`:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ sudo dockerd --exec-opt native.cgroupdriver=systemd
|
|
|
|
```
|
|
|
|
|
|
|
|
Setting this option applies to all containers the daemon launches.
|
2015-10-09 19:04:34 +03:00
|
|
|
|
2015-09-17 17:07:22 +03:00
|
|
|
# HISTORY
|
|
|
|
Sept 2015, Originally compiled by Shishir Mahajan <shishir.mahajan@redhat.com>
|
|
|
|
based on docker.com source material and internal work.
|