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.

37 lines
1.1 KiB

  1. [Unit]
  2. Description=Docker Application Container Engine
  3. Documentation=http://docs.docker.com
  4. {% if ansible_os_family == "RedHat" %}
  5. After=network.target docker-storage-setup.service
  6. Wants=docker-storage-setup.service
  7. {% elif ansible_os_family == "Debian" %}
  8. After=network.target docker.socket
  9. Wants=docker.socket
  10. {% endif %}
  11. [Service]
  12. Type=notify
  13. {% if docker_storage_options is defined %}
  14. Environment="DOCKER_STORAGE_OPTIONS={{ docker_storage_options }}"
  15. {% endif %}
  16. Environment=GOTRACEBACK=crash
  17. ExecReload=/bin/kill -s HUP $MAINPID
  18. Delegate=yes
  19. KillMode=process
  20. ExecStart={{ docker_bin_dir }}/docker{% if installed_docker_version.stdout|version_compare('17.03', '<') %} daemon{% else %}d{% endif %} \
  21. $DOCKER_OPTS \
  22. $DOCKER_STORAGE_OPTIONS \
  23. $DOCKER_NETWORK_OPTIONS \
  24. $DOCKER_DNS_OPTIONS \
  25. $INSECURE_REGISTRY
  26. {% if ansible_os_family == "RedHat" and systemd_version.stdout|int >= 226 %}
  27. TasksMax=infinity
  28. {% endif %}
  29. LimitNOFILE=1048576
  30. LimitNPROC=1048576
  31. LimitCORE=infinity
  32. TimeoutStartSec=1min
  33. Restart=on-abnormal
  34. [Install]
  35. WantedBy=multi-user.target