examples-docker-healthcheck/Dockerfile
2019-06-14 23:09:37 +02:00

13 lines
240 B
Docker

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"]