add healthcheck to mailhog

This commit is contained in:
Arnaud Lier 2025-02-18 17:54:04 +01:00
parent 354e979eb3
commit f5826cb935

View file

@ -2,6 +2,8 @@ FROM alpine:3.21.2
LABEL org.opencontainers.image.authors="alier@student.42mulhouse.fr"
RUN apk add curl
RUN wget https://github.com/mailhog/MailHog/releases/download/v1.0.1/MailHog_linux_amd64 -O /usr/local/bin/mailhog \
&& chmod +x /usr/local/bin/mailhog
#RUN wget https://github.com/mailhog/MailHog/releases/download/v1.0.1/MailHog_linux_arm -O /usr/local/bin/mailhog \
@ -12,4 +14,7 @@ ENV MH_UI_WEB_PATH=mailhog
EXPOSE 1025
EXPOSE 8025
HEALTHCHECK --start-period=5s \
CMD curl "http://localhost:8025" --fail || exit 1
ENTRYPOINT ["mailhog"]