This is to show how healthcheck works in Docker Swarm.
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.

13 lines
240B

  1. FROM nginx:alpine
  2. RUN apk --update add curl
  3. HEALTHCHECK \
  4. --interval=2s \
  5. --timeout=2s \
  6. --retries=2 \
  7. CMD curl -s http://localhost/status | grep -q '^alive$'
  8. COPY entrypoint.sh /entrypoint.sh
  9. ENTRYPOINT ["sh", "/entrypoint.sh"]