mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fixed custom daemon options on systemd docs still using -H fd://
Signed-off-by: Luciano Mores <leslau@gmail.com>
This commit is contained in:
parent
b14f29dfbd
commit
c6fae2d12f
1 changed files with 23 additions and 10 deletions
|
@ -53,7 +53,7 @@ following:
|
||||||
EnvironmentFile=-/etc/sysconfig/docker-storage
|
EnvironmentFile=-/etc/sysconfig/docker-storage
|
||||||
EnvironmentFile=-/etc/sysconfig/docker-network
|
EnvironmentFile=-/etc/sysconfig/docker-network
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/dockerd -H fd:// $OPTIONS \
|
ExecStart=/usr/bin/dockerd $OPTIONS \
|
||||||
$DOCKER_STORAGE_OPTIONS \
|
$DOCKER_STORAGE_OPTIONS \
|
||||||
$DOCKER_NETWORK_OPTIONS \
|
$DOCKER_NETWORK_OPTIONS \
|
||||||
$BLOCK_REGISTRY \
|
$BLOCK_REGISTRY \
|
||||||
|
@ -85,18 +85,31 @@ In this example, we'll assume that your `docker.service` file looks something li
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Docker Application Container Engine
|
Description=Docker Application Container Engine
|
||||||
Documentation=https://docs.docker.com
|
Documentation=https://docs.docker.com
|
||||||
After=network.target docker.socket
|
After=network.target
|
||||||
Requires=docker.socket
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=notify
|
Type=notify
|
||||||
ExecStart=/usr/bin/dockerd -H fd://
|
# the default is not to use systemd for cgroups because the delegate issues still
|
||||||
LimitNOFILE=1048576
|
# exists and systemd currently does not support the cgroup feature set required
|
||||||
LimitNPROC=1048576
|
# for containers run by docker
|
||||||
TasksMax=1048576
|
ExecStart=/usr/bin/dockerd
|
||||||
|
ExecReload=/bin/kill -s HUP $MAINPID
|
||||||
|
# Having non-zero Limit*s causes performance problems due to accounting overhead
|
||||||
|
# in the kernel. We recommend using cgroups to do container-local accounting.
|
||||||
|
LimitNOFILE=infinity
|
||||||
|
LimitNPROC=infinity
|
||||||
|
LimitCORE=infinity
|
||||||
|
# Uncomment TasksMax if your systemd version supports it.
|
||||||
|
# Only systemd 226 and above support this version.
|
||||||
|
#TasksMax=infinity
|
||||||
|
TimeoutStartSec=0
|
||||||
|
# set delegate yes so that systemd does not reset the cgroups of docker containers
|
||||||
|
Delegate=yes
|
||||||
|
# kill only the docker process, not all processes in the cgroup
|
||||||
|
KillMode=process
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
Also=docker.socket
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
This will allow us to add extra flags via a drop-in file (mentioned above) by
|
This will allow us to add extra flags via a drop-in file (mentioned above) by
|
||||||
placing a file containing the following in the `/etc/systemd/system/docker.service.d`
|
placing a file containing the following in the `/etc/systemd/system/docker.service.d`
|
||||||
|
@ -104,7 +117,7 @@ directory:
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/dockerd -H fd:// --graph="/mnt/docker-data" --storage-driver=overlay
|
ExecStart=/usr/bin/dockerd --graph="/mnt/docker-data" --storage-driver=overlay
|
||||||
|
|
||||||
You can also set other environment variables in this file, for example, the
|
You can also set other environment variables in this file, for example, the
|
||||||
`HTTP_PROXY` environment variables described below.
|
`HTTP_PROXY` environment variables described below.
|
||||||
|
@ -114,7 +127,7 @@ by a new configuration as follows:
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/dockerd -H fd:// --bip=172.17.42.1/16
|
ExecStart=/usr/bin/dockerd --bip=172.17.42.1/16
|
||||||
|
|
||||||
If you fail to specify an empty configuration, Docker reports an error such as:
|
If you fail to specify an empty configuration, Docker reports an error such as:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue