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