docker.service 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. [Unit]
  2. Description=Docker Application Container Engine
  3. Documentation=https://docs.docker.com
  4. After=network-online.target docker.socket firewalld.service
  5. Wants=network-online.target
  6. Requires=docker.socket
  7. [Service]
  8. Type=notify
  9. # the default is not to use systemd for cgroups because the delegate issues still
  10. # exists and systemd currently does not support the cgroup feature set required
  11. # for containers run by docker
  12. ExecStart=/usr/bin/dockerd -H fd://
  13. ExecReload=/bin/kill -s HUP $MAINPID
  14. LimitNOFILE=1048576
  15. # Having non-zero Limit*s causes performance problems due to accounting overhead
  16. # in the kernel. We recommend using cgroups to do container-local accounting.
  17. LimitNPROC=infinity
  18. LimitCORE=infinity
  19. # Uncomment TasksMax if your systemd version supports it.
  20. # Only systemd 226 and above support this version.
  21. #TasksMax=infinity
  22. TimeoutStartSec=0
  23. # set delegate yes so that systemd does not reset the cgroups of docker containers
  24. Delegate=yes
  25. # kill only the docker process, not all processes in the cgroup
  26. KillMode=process
  27. # restart the docker process if it exits prematurely
  28. Restart=on-failure
  29. StartLimitBurst=3
  30. StartLimitInterval=60s
  31. [Install]
  32. WantedBy=multi-user.target