Advertisement
Guest User

docker service file

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