github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/cli/man/dockerd.8.md (about)

     1  % "DOCKERD" "8" "SEPTEMBER 2015" "Docker Community" "Docker User Manuals"
     2  
     3  # NAME
     4  dockerd - Enable daemon mode
     5  
     6  # SYNOPSIS
     7  **dockerd**
     8  [**--add-runtime**[=*[]*]]
     9  [**--allow-nondistributable-artifacts**[=*[]*]]
    10  [**--api-cors-header**=[=*API-CORS-HEADER*]]
    11  [**--authorization-plugin**[=*[]*]]
    12  [**-b**|**--bridge**[=*BRIDGE*]]
    13  [**--bip**[=*BIP*]]
    14  [**--cgroup-parent**[=*[]*]]
    15  [**--cluster-store**[=*[]*]]
    16  [**--cluster-advertise**[=*[]*]]
    17  [**--cluster-store-opt**[=*map[]*]]
    18  [**--config-file**[=*/etc/docker/daemon.json*]]
    19  [**--containerd**[=*SOCKET-PATH*]]
    20  [**--data-root**[=*/var/lib/docker*]]
    21  [**-D**|**--debug**]
    22  [**--default-cgroupns-mode**[=*host*]]
    23  [**--default-gateway**[=*DEFAULT-GATEWAY*]]
    24  [**--default-gateway-v6**[=*DEFAULT-GATEWAY-V6*]]
    25  [**--default-address-pool**[=*DEFAULT-ADDRESS-POOL*]]
    26  [**--default-runtime**[=*runc*]]
    27  [**--default-ipc-mode**=*MODE*]
    28  [**--default-shm-size**[=*64MiB*]]
    29  [**--default-ulimit**[=*[]*]]
    30  [**--dns**[=*[]*]]
    31  [**--dns-opt**[=*[]*]]
    32  [**--dns-search**[=*[]*]]
    33  [**--exec-opt**[=*[]*]]
    34  [**--exec-root**[=*/var/run/docker*]]
    35  [**--experimental**[=*false*]]
    36  [**--fixed-cidr**[=*FIXED-CIDR*]]
    37  [**--fixed-cidr-v6**[=*FIXED-CIDR-V6*]]
    38  [**-G**|**--group**[=*docker*]]
    39  [**-H**|**--host**[=*[]*]]
    40  [**--help**]
    41  [**--icc**[=*true*]]
    42  [**--init**[=*false*]]
    43  [**--init-path**[=*""*]]
    44  [**--insecure-registry**[=*[]*]]
    45  [**--ip**[=*0.0.0.0*]]
    46  [**--ip-forward**[=*true*]]
    47  [**--ip-masq**[=*true*]]
    48  [**--iptables**[=*true*]]
    49  [**--ipv6**]
    50  [**--isolation**[=*default*]]
    51  [**-l**|**--log-level**[=*info*]]
    52  [**--label**[=*[]*]]
    53  [**--live-restore**[=*false*]]
    54  [**--log-driver**[=*json-file*]]
    55  [**--log-opt**[=*map[]*]]
    56  [**--mtu**[=*0*]]
    57  [**--max-concurrent-downloads**[=*3*]]
    58  [**--max-concurrent-uploads**[=*5*]]
    59  [**--max-download-attempts**[=*5*]]
    60  [**--node-generic-resources**[=*[]*]]
    61  [**-p**|**--pidfile**[=*/var/run/docker.pid*]]
    62  [**--raw-logs**]
    63  [**--registry-mirror**[=*[]*]]
    64  [**-s**|**--storage-driver**[=*STORAGE-DRIVER*]]
    65  [**--seccomp-profile**[=*SECCOMP-PROFILE-PATH*]]
    66  [**--selinux-enabled**]
    67  [**--shutdown-timeout**[=*15*]]
    68  [**--storage-opt**[=*[]*]]
    69  [**--swarm-default-advertise-addr**[=*IP|INTERFACE*]]
    70  [**--tls**]
    71  [**--tlscacert**[=*~/.docker/ca.pem*]]
    72  [**--tlscert**[=*~/.docker/cert.pem*]]
    73  [**--tlskey**[=*~/.docker/key.pem*]]
    74  [**--tlsverify**]
    75  [**--userland-proxy**[=*true*]]
    76  [**--userland-proxy-path**[=*""*]]
    77  [**--userns-remap**[=*default*]]
    78  
    79  # DESCRIPTION
    80  **dockerd** is used for starting the Docker daemon (i.e., to command the daemon
    81  to manage images, containers etc).  So **dockerd** is a server, as a daemon.
    82  
    83  To run the Docker daemon you can specify **dockerd**.
    84  You can check the daemon options using **dockerd --help**.
    85  Daemon options should be specified after the **dockerd** keyword in the
    86  following format.
    87  
    88  **dockerd [OPTIONS]**
    89  
    90  # OPTIONS
    91  
    92  **--add-runtime**=[]
    93    Runtimes can be registered with the daemon either via the
    94  configuration file or using the `--add-runtime` command line argument.
    95  
    96    The following is an example adding 2 runtimes via the configuration:
    97  
    98  ```json
    99  {
   100  	"default-runtime": "runc",
   101  	"runtimes": {
   102  		"runc": {
   103  			"path": "runc"
   104  		},
   105  		"custom": {
   106  			"path": "/usr/local/bin/my-runc-replacement",
   107  			"runtimeArgs": [
   108  				"--debug"
   109  			]
   110  		}
   111  	}
   112  }
   113  ```
   114  
   115    This is the same example via the command line:
   116  
   117  ```bash
   118  $ sudo dockerd --add-runtime runc=runc --add-runtime custom=/usr/local/bin/my-runc-replacement
   119  ```
   120  
   121    **Note**: defining runtime arguments via the command line is not supported.
   122  
   123  **--allow-nondistributable-artifacts**=[]
   124    Push nondistributable artifacts to the specified registries.
   125  
   126    List can contain elements with CIDR notation to specify a whole subnet.
   127  
   128    This option is useful when pushing images containing nondistributable
   129    artifacts to a registry on an air-gapped network so hosts on that network can
   130    pull the images without connecting to another server.
   131  
   132    **Warning**: Nondistributable artifacts typically have restrictions on how
   133    and where they can be distributed and shared. Only use this feature to push
   134    artifacts to private registries and ensure that you are in compliance with
   135    any terms that cover redistributing nondistributable artifacts.
   136  
   137  **--api-cors-header**=""
   138    Set CORS headers in the Engine API. Default is cors disabled. Give urls like
   139    "http://foo, http://bar, ...". Give "*" to allow all.
   140  
   141  **--authorization-plugin**=""
   142    Set authorization plugins to load
   143  
   144  **-b**, **--bridge**=""
   145    Attach containers to a pre\-existing network bridge; use 'none' to disable
   146    container networking
   147  
   148  **--bip**=""
   149    Use the provided CIDR notation address for the dynamically created bridge
   150    (docker0); Mutually exclusive of \-b
   151  
   152  **--cgroup-parent**=""
   153    Set parent cgroup for all containers. Default is "/docker" for fs cgroup
   154    driver and "system.slice" for systemd cgroup driver.
   155  
   156  **--cluster-store**=""
   157    URL of the distributed storage backend
   158  
   159  **--cluster-advertise**=""
   160    Specifies the 'host:port' or `interface:port` combination that this
   161    particular daemon instance should use when advertising itself to the cluster.
   162    The daemon is reached through this value.
   163  
   164  **--cluster-store-opt**=""
   165    Specifies options for the Key/Value store.
   166  
   167  **--config-file**="/etc/docker/daemon.json"
   168    Specifies the JSON file path to load the configuration from.
   169  
   170  **--containerd**=""
   171    Path to containerd socket.
   172  
   173  **--data-root**=""
   174    Path to the directory used to store persisted Docker data such as
   175    configuration for resources, swarm cluster state, and filesystem data for
   176    images, containers, and local volumes. Default is `/var/lib/docker`.
   177  
   178  **-D**, **--debug**=*true*|*false*
   179    Enable debug mode. Default is false.
   180  
   181  **--default-cgroupns-mode**="**host**|**private**"
   182    Set the default cgroup namespace mode for newly created containers. The argument
   183    can either be **host** or **private**. If unset, this defaults to `host` on cgroup v1,
   184  `private` on cgroup v2.
   185  
   186  **--default-gateway**=""
   187    IPv4 address of the container default gateway; this address must be part of
   188    the bridge subnet (which is defined by \-b or \--bip)
   189  
   190  **--default-gateway-v6**=""
   191    IPv6 address of the container default gateway
   192  
   193  **--default-address-pool**=""
   194    Default address pool from which IPAM driver selects a subnet for the networks.
   195    Example: base=172.30.0.0/16,size=24 will set the default
   196    address pools for the selected scope networks to {172.30.[0-255].0/24}
   197  
   198  **--default-runtime**="runc"
   199    Set default runtime if there're more than one specified by `--add-runtime`.
   200  
   201  **--default-ipc-mode**="**private**|**shareable**"
   202    Set the default IPC mode for newly created containers. The argument
   203    can either be **private** or **shareable**.
   204  
   205  **--default-shm-size**=*64MiB*
   206    Set the daemon-wide default shm size for containers. Default is `64MiB`.
   207  
   208  **--default-ulimit**=[]
   209    Default ulimits for containers.
   210  
   211  **--dns**=""
   212    Force Docker to use specific DNS servers
   213  
   214  **--dns-opt**=""
   215    DNS options to use.
   216  
   217  **--dns-search**=[]
   218    DNS search domains to use.
   219  
   220  **--exec-opt**=[]
   221    Set runtime execution options. See RUNTIME EXECUTION OPTIONS.
   222  
   223  **--exec-root**=""
   224    Path to use as the root of the Docker execution state files. Default is
   225    `/var/run/docker`.
   226  
   227  **--experimental**=""
   228    Enable the daemon experimental features.
   229  
   230  **--fixed-cidr**=""
   231    IPv4 subnet for fixed IPs (e.g., 10.20.0.0/16); this subnet must be nested in
   232    the bridge subnet (which is defined by \-b or \-\-bip).
   233  
   234  **--fixed-cidr-v6**=""
   235    IPv6 subnet for global IPv6 addresses (e.g., 2a00:1450::/64)
   236  
   237  **-G**, **--group**=""
   238    Group to assign the unix socket specified by -H when running in daemon mode.
   239    use '' (the empty string) to disable setting of a group. Default is `docker`.
   240  
   241  **-H**, **--host**=[*unix:///var/run/docker.sock*]: tcp://[host:port] to bind or
   242  unix://[/path/to/socket] to use.
   243    The socket(s) to bind to in daemon mode specified using one or more
   244    tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.
   245  
   246  **--help**
   247    Print usage statement
   248  
   249  **--icc**=*true*|*false*
   250    Allow unrestricted inter\-container and Docker daemon host communication. If
   251    disabled, containers can still be linked together using the **--link** option
   252    (see **docker-run(1)**). Default is true.
   253  
   254  **--init**
   255    Run an init process inside containers for signal forwarding and process
   256    reaping.
   257  
   258  **--init-path**
   259    Path to the docker-init binary.
   260  
   261  **--insecure-registry**=[]
   262    Enable insecure registry communication, i.e., enable un-encrypted and/or
   263    untrusted communication.
   264  
   265    List of insecure registries can contain an element with CIDR notation to
   266    specify a whole subnet. Insecure registries accept HTTP and/or accept HTTPS
   267    with certificates from unknown CAs.
   268  
   269    Enabling `--insecure-registry` is useful when running a local registry.
   270    However, because its use creates security vulnerabilities it should ONLY be
   271    enabled for testing purposes.  For increased security, users should add their
   272    CA to their system's list of trusted CAs instead of using
   273    `--insecure-registry`.
   274  
   275  **--ip**=""
   276    Default IP address to use when binding container ports. Default is `0.0.0.0`.
   277  
   278  **--ip-forward**=*true*|*false*
   279    Enables IP forwarding on the Docker host. The default is `true`. This flag
   280    interacts with the IP forwarding setting on your host system's kernel. If
   281    your system has IP forwarding disabled, this setting enables it. If your
   282    system has IP forwarding enabled, setting this flag to `--ip-forward=false`
   283    has no effect.
   284  
   285    This setting will also enable IPv6 forwarding if you have both
   286    `--ip-forward=true` and `--fixed-cidr-v6` set. Note that this may reject
   287    Router Advertisements and interfere with the host's existing IPv6
   288    configuration. For more information, please consult the documentation about
   289    "Advanced Networking - IPv6".
   290  
   291  **--ip-masq**=*true*|*false*
   292    Enable IP masquerading for bridge's IP range. Default is true.
   293  
   294  **--iptables**=*true*|*false*
   295    Enable Docker's addition of iptables rules. Default is true.
   296  
   297  **--ipv6**=*true*|*false*
   298    Enable IPv6 support. Default is false. Docker will create an IPv6-enabled
   299    bridge with address fe80::1 which will allow you to create IPv6-enabled
   300    containers. Use together with `--fixed-cidr-v6` to provide globally routable
   301    IPv6 addresses. IPv6 forwarding will be enabled if not used with
   302    `--ip-forward=false`. This may collide with your host's current IPv6
   303    settings. For more information please consult the documentation about
   304    "Advanced Networking - IPv6".
   305  
   306  **--isolation**="*default*"
   307     Isolation specifies the type of isolation technology used by containers.
   308     Note that the default on Windows server is `process`, and the default on
   309     Windows client is `hyperv`. Linux only supports `default`.
   310  
   311  **-l**, **--log-level**="*debug*|*info*|*warn*|*error*|*fatal*"
   312    Set the logging level. Default is `info`.
   313  
   314  **--label**="[]"
   315    Set key=value labels to the daemon (displayed in `docker info`)
   316  
   317  **--live-restore**=*false*
   318    Enable live restore of running containers when the daemon starts so that they
   319    are not restarted. This option is applicable only for docker daemon running
   320    on Linux host.
   321  
   322  **--log-driver**="*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*splunk*|*etwlogs*|*gcplogs*|*none*"
   323    Default driver for container logs. Default is `json-file`.
   324    **Warning**: `docker logs` command works only for `json-file` logging driver.
   325  
   326  **--log-opt**=[]
   327    Logging driver specific options.
   328  
   329  **--mtu**=*0*
   330    Set the containers network mtu. Default is `0`.
   331  
   332  **--max-concurrent-downloads**=*3*
   333    Set the max concurrent downloads. Default is `3`.
   334  
   335  **--max-concurrent-uploads**=*5*
   336    Set the max concurrent uploads. Default is `5`.
   337  
   338  **--max-download-attempts**=*5*
   339    Set the max download attempts for each pull. Default is `5`.
   340  
   341  **--node-generic-resources**=*[]*
   342    Advertise user-defined resource. Default is `[]`.
   343    Use this if your swarm cluster has some nodes with custom
   344    resources (e.g: NVIDIA GPU, SSD, ...) and you need your services to land on
   345    nodes advertising these resources.
   346    Usage example: `--node-generic-resources "NVIDIA-GPU=UUID1"
   347    --node-generic-resources "NVIDIA-GPU=UUID2"`
   348  
   349  
   350  **-p**, **--pidfile**=""
   351    Path to use for daemon PID file. Default is `/var/run/docker.pid`
   352  
   353  **--raw-logs**
   354    Output daemon logs in full timestamp format without ANSI coloring. If this
   355    flag is not set, the daemon outputs condensed, colorized logs if a terminal
   356    is detected, or full ("raw") output otherwise.
   357  
   358  **--registry-mirror**=*<scheme>://<host>*
   359    Prepend a registry mirror to be used for image pulls. May be specified
   360    multiple times.
   361  
   362  **-s**, **--storage-driver**=""
   363    Force the Docker runtime to use a specific storage driver.
   364  
   365  **--seccomp-profile**=""
   366    Path to seccomp profile.
   367  
   368  **--selinux-enabled**=*true*|*false*
   369    Enable selinux support. Default is false.
   370  
   371  **--shutdown-timeout**=*15*
   372    Set the shutdown timeout value in seconds. Default is `15`.
   373  
   374  **--storage-opt**=[]
   375    Set storage driver options. See STORAGE DRIVER OPTIONS.
   376  
   377  **--swarm-default-advertise-addr**=*IP|INTERFACE*
   378    Set default address or interface for swarm to advertise as its
   379    externally-reachable address to other cluster members. This can be a
   380    hostname, an IP address, or an interface such as `eth0`. A port cannot be
   381    specified with this option.
   382  
   383  **--tls**=*true*|*false*
   384    Use TLS; implied by --tlsverify. Default is false.
   385  
   386  **--tlscacert**=*~/.docker/ca.pem*
   387    Trust certs signed only by this CA.
   388  
   389  **--tlscert**=*~/.docker/cert.pem*
   390    Path to TLS certificate file.
   391  
   392  **--tlskey**=*~/.docker/key.pem*
   393    Path to TLS key file.
   394  
   395  **--tlsverify**=*true*|*false*
   396    Use TLS and verify the remote (daemon: verify client, client: verify daemon).
   397    Default is false.
   398  
   399  **--userland-proxy**=*true*|*false*
   400    Rely on a userland proxy implementation for inter-container and
   401    outside-to-container loopback communications. Default is true.
   402  
   403  **--userland-proxy-path**=""
   404    Path to the userland proxy binary.
   405  
   406  **--userns-remap**=*default*|*uid:gid*|*user:group*|*user*|*uid*
   407    Enable user namespaces for containers on the daemon. Specifying "default"
   408    will cause a new user and group to be created to handle UID and GID range
   409    remapping for the user namespace mappings used for contained processes.
   410    Specifying a user (or uid) and optionally a group (or gid) will cause the
   411    daemon to lookup the user and group's subordinate ID ranges for use as the
   412    user namespace mappings for contained processes.
   413  
   414  # STORAGE DRIVER OPTIONS
   415  
   416  Docker uses storage backends (known as "graphdrivers" in the Docker
   417  internals) to create writable containers from images.  Many of these
   418  backends use operating system level technologies and can be
   419  configured.
   420  
   421  Specify options to the storage backend with **--storage-opt** flags. The
   422  backends that currently take options are *devicemapper*, *zfs* and *btrfs*.
   423  Options for *devicemapper* are prefixed with *dm*, options for *zfs*
   424  start with *zfs* and options for *btrfs* start with *btrfs*.
   425  
   426  Specifically for devicemapper, the default is a "loopback" model which
   427  requires no pre-configuration, but is extremely inefficient.  Do not
   428  use it in production.
   429  
   430  To make the best use of Docker with the devicemapper backend, you must
   431  have a recent version of LVM.  Use `lvm` to create a thin pool; for
   432  more information see `man lvmthin`.  Then, use `--storage-opt
   433  dm.thinpooldev` to tell the Docker engine to use that pool for
   434  allocating images and container snapshots.
   435  
   436  ## Devicemapper options
   437  
   438  #### dm.thinpooldev
   439  
   440  Specifies a custom block storage device to use for the thin pool.
   441  
   442  If using a block device for device mapper storage, it is best to use `lvm`
   443  to create and manage the thin-pool volume. This volume is then handed to Docker
   444  to exclusively create snapshot volumes needed for images and containers.
   445  
   446  Managing the thin-pool outside of Engine makes for the most feature-rich
   447  method of having Docker utilize device mapper thin provisioning as the
   448  backing storage for Docker containers. The highlights of the lvm-based
   449  thin-pool management feature include: automatic or interactive thin-pool
   450  resize support, dynamically changing thin-pool features, automatic thinp
   451  metadata checking when lvm activates the thin-pool, etc.
   452  
   453  As a fallback if no thin pool is provided, loopback files are
   454  created. Loopback is very slow, but can be used without any
   455  pre-configuration of storage. It is strongly recommended that you do
   456  not use loopback in production. Ensure your Engine daemon has a
   457  `--storage-opt dm.thinpooldev` argument provided.
   458  
   459  Example use:
   460  
   461     $ dockerd \
   462           --storage-opt dm.thinpooldev=/dev/mapper/thin-pool
   463  
   464  #### dm.directlvm_device
   465  
   466  As an alternative to manually creating a thin pool as above, Docker can
   467  automatically configure a block device for you.
   468  
   469  Example use:
   470  
   471     $ dockerd \
   472           --storage-opt dm.directlvm_device=/dev/xvdf
   473  
   474  ##### dm.thinp_percent
   475  
   476  Sets the percentage of passed in block device to use for storage.
   477  
   478  ###### Example:
   479  
   480     $ sudo dockerd \
   481          --storage-opt dm.thinp_percent=95
   482  
   483  ##### `dm.thinp_metapercent`
   484  
   485  Sets the percentage of the passed in block device to use for metadata storage.
   486  
   487  ###### Example:
   488  
   489     $ sudo dockerd \
   490           --storage-opt dm.thinp_metapercent=1
   491  
   492  ##### dm.thinp_autoextend_threshold
   493  
   494  Sets the value of the percentage of space used before `lvm` attempts to
   495  autoextend the available space [100 = disabled]
   496  
   497  ###### Example:
   498  
   499     $ sudo dockerd \
   500           --storage-opt dm.thinp_autoextend_threshold=80
   501  
   502  ##### dm.thinp_autoextend_percent
   503  
   504  Sets the value percentage value to increase the thin pool by when `lvm`
   505  attempts to autoextend the available space [100 = disabled]
   506  
   507  ###### Example:
   508  
   509     $ sudo dockerd \
   510           --storage-opt dm.thinp_autoextend_percent=20
   511  
   512  #### dm.basesize
   513  
   514  Specifies the size to use when creating the base device, which limits
   515  the size of images and containers. The default value is 10G. Note,
   516  thin devices are inherently "sparse", so a 10G device which is mostly
   517  empty doesn't use 10 GB of space on the pool. However, the filesystem
   518  will use more space for base images the larger the device
   519  is.
   520  
   521  The base device size can be increased at daemon restart which will allow
   522  all future images and containers (based on those new images) to be of the
   523  new base device size.
   524  
   525  Example use: `dockerd --storage-opt dm.basesize=50G`
   526  
   527  This will increase the base device size to 50G. The Docker daemon will throw an
   528  error if existing base device size is larger than 50G. A user can use
   529  this option to expand the base device size however shrinking is not permitted.
   530  
   531  This value affects the system-wide "base" empty filesystem that may already
   532  be initialized and inherited by pulled images. Typically, a change to this
   533  value requires additional steps to take effect:
   534  
   535          $ sudo service docker stop
   536          $ sudo rm -rf /var/lib/docker
   537          $ sudo service docker start
   538  
   539  Example use: `dockerd --storage-opt dm.basesize=20G`
   540  
   541  #### dm.fs
   542  
   543  Specifies the filesystem type to use for the base device. The
   544  supported options are `ext4` and `xfs`. The default is `ext4`.
   545  
   546  Example use: `dockerd --storage-opt dm.fs=xfs`
   547  
   548  #### dm.mkfsarg
   549  
   550  Specifies extra mkfs arguments to be used when creating the base device.
   551  
   552  Example use: `dockerd --storage-opt "dm.mkfsarg=-O ^has_journal"`
   553  
   554  #### dm.mountopt
   555  
   556  Specifies extra mount options used when mounting the thin devices.
   557  
   558  Example use: `dockerd --storage-opt dm.mountopt=nodiscard`
   559  
   560  #### dm.use_deferred_removal
   561  
   562  Enables use of deferred device removal if `libdm` and the kernel driver
   563  support the mechanism.
   564  
   565  Deferred device removal means that if device is busy when devices are
   566  being removed/deactivated, then a deferred removal is scheduled on
   567  device. And devices automatically go away when last user of the device
   568  exits.
   569  
   570  For example, when a container exits, its associated thin device is removed. If
   571  that device has leaked into some other mount namespace and can't be removed,
   572  the container exit still succeeds and this option causes the system to schedule
   573  the device for deferred removal. It does not wait in a loop trying to remove a
   574  busy device.
   575  
   576  Example use: `dockerd --storage-opt dm.use_deferred_removal=true`
   577  
   578  #### dm.use_deferred_deletion
   579  
   580  Enables use of deferred device deletion for thin pool devices. By default,
   581  thin pool device deletion is synchronous. Before a container is deleted, the
   582  Docker daemon removes any associated devices. If the storage driver can not
   583  remove a device, the container deletion fails and daemon returns.
   584  
   585  `Error deleting container: Error response from daemon: Cannot destroy container`
   586  
   587  To avoid this failure, enable both deferred device deletion and deferred
   588  device removal on the daemon.
   589  
   590  `dockerd --storage-opt dm.use_deferred_deletion=true --storage-opt dm.use_deferred_removal=true`
   591  
   592  With these two options enabled, if a device is busy when the driver is
   593  deleting a container, the driver marks the device as deleted. Later, when the
   594  device isn't in use, the driver deletes it.
   595  
   596  In general it should be safe to enable this option by default. It will help
   597  when unintentional leaking of mount point happens across multiple mount
   598  namespaces.
   599  
   600  #### dm.loopdatasize
   601  
   602  **Note**: This option configures devicemapper loopback, which should not be
   603  used in production.
   604  
   605  Specifies the size to use when creating the loopback file for the "data" device
   606  which is used for the thin pool. The default size is 100G. The file is sparse,
   607  so it will not initially take up this much space.
   608  
   609  Example use: `dockerd --storage-opt dm.loopdatasize=200G`
   610  
   611  #### dm.loopmetadatasize
   612  
   613  **Note**: This option configures devicemapper loopback, which should not be
   614  used in production.
   615  
   616  Specifies the size to use when creating the loopback file for the "metadata"
   617  device which is used for the thin pool. The default size is 2G. The file is
   618  sparse, so it will not initially take up this much space.
   619  
   620  Example use: `dockerd --storage-opt dm.loopmetadatasize=4G`
   621  
   622  #### dm.datadev
   623  
   624  (Deprecated, use `dm.thinpooldev`)
   625  
   626  Specifies a custom blockdevice to use for data for a Docker-managed thin pool.
   627  It is better to use `dm.thinpooldev` - see the documentation for it above for
   628  discussion of the advantages.
   629  
   630  #### dm.metadatadev
   631  
   632  (Deprecated, use `dm.thinpooldev`)
   633  
   634  Specifies a custom blockdevice to use for metadata for a Docker-managed thin
   635  pool.  See `dm.datadev` for why this is deprecated.
   636  
   637  #### dm.blocksize
   638  
   639  Specifies a custom blocksize to use for the thin pool.  The default
   640  blocksize is 64K.
   641  
   642  Example use: `dockerd --storage-opt dm.blocksize=512K`
   643  
   644  #### dm.blkdiscard
   645  
   646  Enables or disables the use of `blkdiscard` when removing devicemapper devices.
   647  This is disabled by default due to the additional latency, but as a special
   648  case with loopback devices it will be enabled, in order to re-sparsify the
   649  loopback file on image/container removal.
   650  
   651  Disabling this on loopback can lead to *much* faster container removal times,
   652  but it also prevents the space used in `/var/lib/docker` directory from being
   653  returned to the system for other use when containers are removed.
   654  
   655  Example use: `dockerd --storage-opt dm.blkdiscard=false`
   656  
   657  #### dm.override_udev_sync_check
   658  
   659  By default, the devicemapper backend attempts to synchronize with the `udev`
   660  device manager for the Linux kernel.  This option allows disabling that
   661  synchronization, to continue even though the configuration may be buggy.
   662  
   663  To view the `udev` sync support of a Docker daemon that is using the
   664  `devicemapper` driver, run:
   665  
   666          $ docker info
   667          [...]
   668           Udev Sync Supported: true
   669          [...]
   670  
   671  When `udev` sync support is `true`, then `devicemapper` and `udev` can
   672  coordinate the activation and deactivation of devices for containers.
   673  
   674  When `udev` sync support is `false`, a race condition occurs between the
   675  `devicemapper` and `udev` during create and cleanup. The race condition results
   676  in errors and failures. (For information on these failures, see
   677  [docker#4036](https://github.com/docker/docker/issues/4036))
   678  
   679  To allow the `docker` daemon to start, regardless of whether `udev` sync is
   680  `false`, set `dm.override_udev_sync_check` to true:
   681  
   682          $ dockerd --storage-opt dm.override_udev_sync_check=true
   683  
   684  When this value is `true`, the driver continues and simply warns you the errors
   685  are happening.
   686  
   687  **Note**: The ideal is to pursue a `docker` daemon and environment that does
   688  support synchronizing with `udev`. For further discussion on this topic, see
   689  [docker#4036](https://github.com/docker/docker/issues/4036).
   690  Otherwise, set this flag for migrating existing Docker daemons to a daemon with
   691  a supported environment.
   692  
   693  #### dm.min_free_space
   694  
   695  Specifies the min free space percent in a thin pool require for new device
   696  creation to succeed. This check applies to both free data space as well
   697  as free metadata space. Valid values are from 0% - 99%. Value 0% disables
   698  free space checking logic. If user does not specify a value for this option,
   699  the Engine uses a default value of 10%.
   700  
   701  Whenever a new a thin pool device is created (during `docker pull` or during
   702  container creation), the Engine checks if the minimum free space is available.
   703  If the space is unavailable, then device creation fails and any relevant
   704  `docker` operation fails.
   705  
   706  To recover from this error, you must create more free space in the thin pool to
   707  recover from the error. You can create free space by deleting some images and
   708  containers from tge thin pool. You can also add more storage to the thin pool.
   709  
   710  To add more space to an LVM (logical volume management) thin pool, just add
   711  more storage to the  group container thin pool; this should automatically
   712  resolve any errors. If your configuration uses loop devices, then stop the
   713  Engine daemon, grow the size of loop files and restart the daemon to resolve
   714  the issue.
   715  
   716  Example use:: `dockerd --storage-opt dm.min_free_space=10%`
   717  
   718  #### dm.xfs_nospace_max_retries
   719  
   720  Specifies the maximum number of retries XFS should attempt to complete IO when
   721  ENOSPC (no space) error is returned by underlying storage device.
   722  
   723  By default XFS retries infinitely for IO to finish and this can result in
   724  unkillable process. To change this behavior one can set xfs_nospace_max_retries
   725  to say 0 and XFS will not retry IO after getting ENOSPC and will shutdown
   726  filesystem.
   727  
   728  Example use:
   729  
   730      $ sudo dockerd --storage-opt dm.xfs_nospace_max_retries=0
   731  
   732  ##### dm.libdm_log_level
   733  
   734  Specifies the maxmimum libdm log level that will be forwarded to the dockerd
   735  log (as specified by --log-level). This option is primarily intended for
   736  debugging problems involving libdm. Using values other than the defaults may
   737  cause false-positive warnings to be logged.
   738  
   739  Values specified must fall within the range of valid libdm log levels. At the
   740  time of writing, the following is the list of libdm log levels as well as their
   741  corresponding levels when output by dockerd.
   742  
   743  | libdm Level | Value | --log-level |
   744  | ----------- | -----:| ----------- |
   745  | _LOG_FATAL  |     2 | error       |
   746  | _LOG_ERR    |     3 | error       |
   747  | _LOG_WARN   |     4 | warn        |
   748  | _LOG_NOTICE |     5 | info        |
   749  | _LOG_INFO   |     6 | info        |
   750  | _LOG_DEBUG  |     7 | debug       |
   751  
   752  Example use:
   753  
   754      $ sudo dockerd \
   755  	      --log-level debug \
   756            --storage-opt dm.libdm_log_level=7
   757  
   758  ## ZFS options
   759  
   760  #### zfs.fsname
   761  
   762  Set zfs filesystem under which docker will create its own datasets.  By default
   763  docker will pick up the zfs filesystem where docker graph (`/var/lib/docker`)
   764  is located.
   765  
   766  Example use: `dockerd -s zfs --storage-opt zfs.fsname=zroot/docker`
   767  
   768  ## Btrfs options
   769  
   770  #### btrfs.min_space
   771  
   772  Specifies the minimum size to use when creating the subvolume which is used for
   773  containers. If user uses disk quota for btrfs when creating or running a
   774  container with **--storage-opt size** option, docker should ensure the **size**
   775  cannot be smaller than **btrfs.min_space**.
   776  
   777  Example use: `docker daemon -s btrfs --storage-opt btrfs.min_space=10G`
   778  
   779  # CLUSTER STORE OPTIONS
   780  
   781  The daemon uses libkv to advertise the node within the cluster.  Some Key/Value
   782  backends support mutual TLS, and the client TLS settings used by the daemon can
   783  be configured using the **--cluster-store-opt** flag, specifying the paths to
   784  PEM encoded files.
   785  
   786  #### kv.cacertfile
   787  
   788  Specifies the path to a local file with PEM encoded CA certificates to trust
   789  
   790  #### kv.certfile
   791  
   792  Specifies the path to a local file with a PEM encoded certificate.  This
   793  certificate is used as the client cert for communication with the Key/Value
   794  store.
   795  
   796  #### kv.keyfile
   797  
   798  Specifies the path to a local file with a PEM encoded private key.  This
   799  private key is used as the client key for communication with the Key/Value
   800  store.
   801  
   802  # Access authorization
   803  
   804  Docker's access authorization can be extended by authorization plugins that
   805  your organization can purchase or build themselves. You can install one or more
   806  authorization plugins when you start the Docker `daemon` using the
   807  `--authorization-plugin=PLUGIN_ID` option.
   808  
   809  ```bash
   810  dockerd --authorization-plugin=plugin1 --authorization-plugin=plugin2,...
   811  ```
   812  
   813  The `PLUGIN_ID` value is either the plugin's name or a path to its
   814  specification file. The plugin's implementation determines whether you can
   815  specify a name or path. Consult with your Docker administrator to get
   816  information about the plugins available to you.
   817  
   818  Once a plugin is installed, requests made to the `daemon` through the
   819  command line or Docker's Engine API are allowed or denied by the plugin.
   820  If you have multiple plugins installed, each plugin, in order, must
   821  allow the request for it to complete.
   822  
   823  For information about how to create an authorization plugin, see [access authorization
   824  plugin](https://docs.docker.com/engine/extend/plugins_authorization/) section in the
   825  Docker extend section of this documentation.
   826  
   827  # RUNTIME EXECUTION OPTIONS
   828  
   829  You can configure the runtime using options specified with the `--exec-opt` flag.
   830  All the flag's options have the `native` prefix. A single `native.cgroupdriver`
   831  option is available.
   832  
   833  The `native.cgroupdriver` option specifies the management of the container's
   834  cgroups. You can only specify `cgroupfs` or `systemd`. If you specify
   835  `systemd` and it is not available, the system errors out. If you omit the
   836  `native.cgroupdriver` option,` cgroupfs` is used on cgroup v1 hosts, `systemd`
   837  is used on cgroup v2 hosts with systemd available.
   838  
   839  This example sets the `cgroupdriver` to `systemd`:
   840  
   841  ```bash
   842  $ sudo dockerd --exec-opt native.cgroupdriver=systemd
   843  ```
   844  
   845  Setting this option applies to all containers the daemon launches.
   846  
   847  # HISTORY
   848  Sept 2015, Originally compiled by Shishir Mahajan <shishir.mahajan@redhat.com>
   849  based on docker.com source material and internal work.