dockerd (8) - Linux Manuals
dockerd: Enable daemon mode
NAME
dockerd - Enable daemon mode
SYNOPSIS
dockerd [--add-runtime[=[]]] [--allow-nondistributable-artifacts[=[]]] [--api-cors-header=[=API-CORS-HEADER]] [--authorization-plugin[=[]]] [-b|--bridge[=BRIDGE]] [--bip[=BIP]] [--cgroup-parent[=[]]] [--cluster-store[=[]]] [--cluster-advertise[=[]]] [--cluster-store-opt[=map[]]] [--config-file[=/etc/docker/daemon.json]] [--containerd[=SOCKET-PATH]] [--data-root[=/var/lib/docker]] [-D|--debug] [--default-cgroupns-mode[=host]] [--default-gateway[=DEFAULT-GATEWAY]] [--default-gateway-v6[=DEFAULT-GATEWAY-V6]] [--default-address-pool[=DEFAULT-ADDRESS-POOL]] [--default-runtime[=runc]] [--default-ipc-mode=MODE] [--default-shm-size[=64MiB]] [--default-ulimit[=[]]] [--dns[=[]]] [--dns-opt[=[]]] [--dns-search[=[]]] [--exec-opt[=[]]] [--exec-root[=/var/run/docker]] [--experimental[=false]] [--fixed-cidr[=FIXED-CIDR]] [--fixed-cidr-v6[=FIXED-CIDR-V6]] [-G|--group[=docker]] [-H|--host[=[]]] [--help] [--icc[=true]] [--init[=false]] [--init-path[=""]] [--insecure-registry[=[]]] [--ip[=0.0.0.0]] [--ip-forward[=true]] [--ip-masq[=true]] [--iptables[=true]] [--ipv6] [--isolation[=default]] [-l|--log-level[=info]] [--label[=[]]] [--live-restore[=false]] [--log-driver[=json-file]] [--log-opt[=map[]]] [--mtu[=0]] [--max-concurrent-downloads[=3]] [--max-concurrent-uploads[=5]] [--max-download-attempts[=5]] [--node-generic-resources[=[]]] [-p|--pidfile[=/var/run/docker.pid]] [--raw-logs] [--registry-mirror[=[]]] [-s|--storage-driver[=STORAGE-DRIVER]] [--seccomp-profile[=SECCOMP-PROFILE-PATH]] [--selinux-enabled] [--shutdown-timeout[=15]] [--storage-opt[=[]]] [--swarm-default-advertise-addr[=IP|INTERFACE]] [--tls] [--tlscacert[=~/.docker/ca.pem]] [--tlscert[=~/.docker/cert.pem]] [--tlskey[=~/.docker/key.pem]] [--tlsverify] [--userland-proxy[=true]] [--userland-proxy-path[=""]] [--userns-remap[=default]]
DESCRIPTION
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.
To run the Docker daemon you can specify dockerd. You can check the daemon options using dockerd --help. Daemon options should be specified after the dockerd keyword in the following format.
dockerd [OPTIONS]
OPTIONS
--add-runtime=[]
The following is an example adding 2 runtimes via the configuration:
This is the same example via the command line:
Note: defining runtime arguments via the command line is not supported.
--allow-nondistributable-artifacts=[]
List can contain elements with CIDR notation to specify a whole subnet.
This option is useful when pushing images containing nondistributable
Warning: Nondistributable artifacts typically have restrictions on how
--api-cors-header=""
--authorization-plugin=""
-b, --bridge=""
--bip=""
--cgroup-parent=""
--cluster-store=""
--cluster-advertise=""
--cluster-store-opt=""
--config-file="/etc/docker/daemon.json"
--containerd=""
--data-root=""
-D, --debug=true|false
--default-cgroupns-mode="host|private"
--default-gateway=""
--default-gateway-v6=""
--default-address-pool=""
--default-runtime="runc"
--default-ipc-mode="private|shareable"
--default-shm-size=64MiB
--default-ulimit=[]
--dns=""
--dns-opt=""
--dns-search=[]
--exec-opt=[]
--exec-root=""
--experimental=""
--fixed-cidr=""
--fixed-cidr-v6=""
-G, --group=""
-H, --host=[unix:///var/run/docker.sock]: tcp://[host:port] to bind or
unix://[/path/to/socket] to use.
--help
--icc=true|false
--init
--init-path
--insecure-registry=[]
List of insecure registries can contain an element with CIDR notation to
Enabling --insecure-registry is useful when running a local registry.
--ip=""
--ip-forward=true|false
This setting will also enable IPv6 forwarding if you have both
--ip-masq=true|false
--iptables=true|false
--ipv6=true|false
--isolation="default"
-l, --log-level="debug|info|warn|error|fatal"
--label="[]"
--live-restore=false
--log-driver="json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs|none"
--log-opt=[]
--mtu=0
--max-concurrent-downloads=3
--max-concurrent-uploads=5
--max-download-attempts=5
--node-generic-resources=[]
-p, --pidfile=""
--raw-logs
--registry-mirror=://
-s, --storage-driver=""
--seccomp-profile=""
--selinux-enabled=true|false
--shutdown-timeout=15
--storage-opt=[]
--swarm-default-advertise-addr=IP|INTERFACE
--tls=true|false
--tlscacert=~/.docker/ca.pem
--tlscert=~/.docker/cert.pem
--tlskey=~/.docker/key.pem
--tlsverify=true|false
--userland-proxy=true|false
--userland-proxy-path=""
--userns-remap=default|uid:gid|user:group|user|uid
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.
Specify options to the storage backend with --storage-opt flags. The
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.
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.
Specifies a custom block storage device to use for the thin pool.
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.
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.
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:
$ dockerd \
As an alternative to manually creating a thin pool as above, Docker can
automatically configure a block device for you.
Example use:
$ dockerd \
Sets the percentage of passed in block device to use for storage.
$ sudo dockerd \
Sets the percentage of the passed in block device to use for metadata storage.
$ sudo dockerd \
{
"default-runtime": "runc",
"runtimes": {
"runc": {
"path": "runc"
},
"custom": {
"path": "/usr/local/bin/my-runc-replacement",
"runtimeArgs": [
"--debug"
]
}
}
}
$ sudo dockerd --add-runtime runc=runc --add-runtime custom=/usr/local/bin/my-runc-replacement
STORAGE DRIVER OPTIONS
Devicemapper options
dm.thinpooldev
dm.directlvm_device
dm.thinp_percent
Example:
dm.thinp_metapercent
Example: