You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

  1. [Unit]
  2. Description=Docker Application Container Engine
  3. Documentation=http://docs.docker.com
  4. After=network.target docker.socket containerd.service lvm2-monitor.service SuSEfirewall2.service
  5. {% if ansible_os_family != "Suse" %}
  6. BindsTo=containerd.service
  7. {% endif %}
  8. Wants=docker.socket
  9. [Service]
  10. Type=notify
  11. {% if docker_storage_options is defined %}
  12. Environment="DOCKER_STORAGE_OPTIONS={{ docker_storage_options }}"
  13. {% endif %}
  14. Environment=GOTRACEBACK=crash
  15. ExecReload=/bin/kill -s HUP $MAINPID
  16. Delegate=yes
  17. KillMode=process
  18. ExecStart={{ docker_bin_dir }}/dockerd \
  19. {% if ansible_os_family == "Suse" %}
  20. --add-runtime oci=/usr/sbin/docker-runc \
  21. {% endif %}
  22. $DOCKER_OPTS \
  23. $DOCKER_STORAGE_OPTIONS \
  24. $DOCKER_DNS_OPTIONS
  25. TasksMax=infinity
  26. LimitNOFILE=1048576
  27. LimitNPROC=1048576
  28. LimitCORE=infinity
  29. TimeoutStartSec=1min
  30. # restart the docker process if it exits prematurely
  31. Restart=on-failure
  32. StartLimitBurst=3
  33. StartLimitInterval=60s
  34. # Set the cgroup slice of the service so that kube reserved takes effect
  35. {% if kube_reserved is defined and kube_reserved|bool %}
  36. Slice={{ kube_reserved_cgroups_for_service_slice }}
  37. {% endif %}
  38. [Install]
  39. WantedBy=multi-user.target