github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/contrib/init/systemd/docker.service (about) 1 [Unit] 2 Description=Docker Application Container Engine 3 Documentation=https://docs.docker.com 4 After=network-online.target docker.socket firewalld.service containerd.service time-set.target 5 Wants=network-online.target containerd.service 6 Requires=docker.socket 7 8 [Service] 9 Type=notify 10 # the default is not to use systemd for cgroups because the delegate issues still 11 # exists and systemd currently does not support the cgroup feature set required 12 # for containers run by docker 13 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock 14 ExecReload=/bin/kill -s HUP $MAINPID 15 TimeoutStartSec=0 16 RestartSec=2 17 Restart=always 18 19 # Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229. 20 # Both the old, and new location are accepted by systemd 229 and up, so using the old location 21 # to make them work for either version of systemd. 22 StartLimitBurst=3 23 24 # Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230. 25 # Both the old, and new name are accepted by systemd 230 and up, so using the old name to make 26 # this option work for either version of systemd. 27 StartLimitInterval=60s 28 29 # Having non-zero Limit*s causes performance problems due to accounting overhead 30 # in the kernel. We recommend using cgroups to do container-local accounting. 31 LimitNOFILE=infinity 32 LimitNPROC=infinity 33 LimitCORE=infinity 34 35 # Comment TasksMax if your systemd version does not support it. 36 # Only systemd 226 and above support this option. 37 TasksMax=infinity 38 39 # set delegate yes so that systemd does not reset the cgroups of docker containers 40 Delegate=yes 41 42 # kill only the docker process, not all processes in the cgroup 43 KillMode=process 44 OOMScoreAdjust=-500 45 46 [Install] 47 WantedBy=multi-user.target