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.

22 lines
735 B

  1. #!/bin/bash
  2. {{ docker_bin_dir }}/docker run \
  3. --restart=on-failure:5 \
  4. --env-file=/etc/etcd.env \
  5. --net=host \
  6. -v /etc/ssl/certs:/etc/ssl/certs:ro \
  7. -v {{ etcd_cert_dir }}:{{ etcd_cert_dir }}:ro \
  8. -v {{ etcd_data_dir }}:{{ etcd_data_dir }}:rw \
  9. {% if etcd_memory_limit is defined %}
  10. --memory={{ etcd_memory_limit|regex_replace('Mi', 'M') }} \
  11. {% endif %}
  12. --oom-kill-disable \
  13. {% if etcd_cpu_limit is defined %}
  14. --cpu-shares={{ etcd_cpu_limit|regex_replace('m', '') }} \
  15. {% endif %}
  16. {% if etcd_blkio_weight is defined %}
  17. --blkio-weight={{ etcd_blkio_weight }} \
  18. {% endif %}
  19. --name={{ etcd_member_name | default("etcd") }} \
  20. {{ etcd_image_repo }}:{{ etcd_image_tag }} \
  21. /usr/local/bin/etcd \
  22. "$@"