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-08-14 16:30:22 -04:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
# Install containerd-shim-process if it's not already installed
|
2018-08-15 19:13:21 -04:00
|
|
|
ExecStartPre=/usr/libexec/containerd-offline-installer /var/lib/containerd-offline-installer/containerd-shim-process.tar docker.io/docker/containerd-shim-process
|
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-08-14 16:30:22 -04:00
|
|
|
ExecStart=/usr/bin/dockerd
|
2018-08-28 13:51:21 -04:00
|
|
|
ExecStopPost=/usr/bin/dockerd post-stop
|
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
|
|
|
|
# On RPM Based distributions PATH isn't defined so we define it here
|
|
|
|
# /opt/containerd/bin is in front so dockerd grabs the correct runc binary
|
|
|
|
Environment="PATH=/opt/containerd/bin:/sbin:/usr/bin:/usr/local/bin:$PATH"
|
2018-08-14 16:30:22 -04:00
|
|
|
|
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
|