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.

20 lines
661 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 }}:/var/lib/etcd:rw \
  9. {% if etcd_memory_limit is defined %}
  10. --memory={{ etcd_memory_limit|regex_replace('Mi', 'M') }} \
  11. {% endif %}
  12. {% if etcd_cpu_limit is defined %}
  13. --cpu-shares={{ etcd_cpu_limit|regex_replace('m', '') }} \
  14. {% endif %}
  15. --name={{ etcd_member_name | default("etcd") }} \
  16. {{ etcd_image_repo }}:{{ etcd_image_tag }} \
  17. {% if etcd_after_v3 %}
  18. {{ etcd_container_bin_dir }}etcd \
  19. {% endif %}
  20. "$@"