summaryrefslogtreecommitdiff
path: root/systemd/docker-engine.service
blob: 44db9a0eb6e6de182f7328b162e43afefc30e88d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=connman.service docker-engine.socket
Requires=docker-engine.socket

[Service]
Type=notify
SmackProcessLabel=System::Privileged
ExecStart=/usr/bin/dockerd --userland-proxy=false --data-root /opt/var/lib/docker -H fd:// -H tcp://0.0.0.0:2375 --bridge none
ExecStartPost=-/bin/sh -c "mkdir /sys/fs/cgroup/watchdog/docker; test -d /sys/fs/cgroup/watchdog/docker && echo 0 > /sys/fs/cgroup/watchdog/docker/notify_on_release"
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=1048576
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
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
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target