examples-docker-healthcheck/Dockerfile

13 lines
240 B
Docker
Raw Normal View History

2019-06-14 21:09:37 +00:00
FROM nginx:alpine
RUN apk --update add curl
HEALTHCHECK \
--interval=2s \
--timeout=2s \
--retries=2 \
CMD curl -s http://localhost/status | grep -q '^alive$'
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["sh", "/entrypoint.sh"]