2018-08-14 16:30:22 -04:00
|
|
|
[Unit]
|
|
|
|
Description=Docker Application Container Engine
|
|
|
|
Documentation=https://docs.docker.com
|
2018-08-20 17:13:52 -04:00
|
|
|
BindsTo=containerd.service
|
|
|
|
After=network-online.target firewalld.service
|
|
|
|
Wants=network-online.target
|
2018-12-03 14:14:10 -05:00
|
|
|
Requires=docker.socket
|
2018-08-14 16:30:22 -04:00
|
|
|
|
|
|
|
[Service]
|
2018-10-08 14:51:09 -04:00
|
|
|
Type=notify
|
2018-08-31 06:53:49 -04:00
|
|
|
# the default is not to use systemd for cgroups because the delegate issues still
|
|
|
|
# exists and systemd currently does not support the cgroup feature set required
|
|
|
|
# for containers run by docker
|
2018-11-28 19:47:07 -05:00
|
|
|
ExecStart=/usr/bin/dockerd -H fd://
|
2018-08-31 06:57:03 -04:00
|
|
|
ExecReload=/bin/kill -s HUP $MAINPID
|
2018-08-16 00:03:40 -04:00
|
|
|
TimeoutSec=0
|
2018-08-24 18:40:02 -04:00
|
|
|
RestartSec=2
|
2018-08-14 21:42:10 -04:00
|
|
|
Restart=always
|
2018-08-31 06:58:50 -04:00
|
|
|
|
|
|
|
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
|
|
|
|
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
|
|
|
|
# to make them work for either version of systemd.
|
|
|
|
StartLimitBurst=3
|
|
|
|
|
|
|
|
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
|
|
|
|
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
|
|
|
|
# this option work for either version of systemd.
|
|
|
|
StartLimitInterval=60s
|
|
|
|
|
2018-08-31 06:45:07 -04:00
|
|
|
# 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
|
2018-08-31 06:43:32 -04:00
|
|
|
LimitCORE=infinity
|
|
|
|
|
2018-08-31 06:50:05 -04:00
|
|
|
# Comment TasksMax if your systemd version does not supports it.
|
|
|
|
# Only systemd 226 and above support this option.
|
|
|
|
TasksMax=infinity
|
|
|
|
|
2018-08-31 06:53:49 -04:00
|
|
|
# set delegate yes so that systemd does not reset the cgroups of docker containers
|
|
|
|
Delegate=yes
|
|
|
|
|
2018-08-31 06:55:39 -04:00
|
|
|
# kill only the docker process, not all processes in the cgroup
|
|
|
|
KillMode=process
|
|
|
|
|
2018-08-14 16:30:22 -04:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|