add healthcheck to mailhog
This commit is contained in:
parent
354e979eb3
commit
f5826cb935
1 changed files with 5 additions and 0 deletions
|
@ -2,6 +2,8 @@ FROM alpine:3.21.2
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="alier@student.42mulhouse.fr"
|
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 \
|
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
|
&& 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 \
|
#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 1025
|
||||||
EXPOSE 8025
|
EXPOSE 8025
|
||||||
|
|
||||||
|
HEALTHCHECK --start-period=5s \
|
||||||
|
CMD curl "http://localhost:8025" --fail || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["mailhog"]
|
ENTRYPOINT ["mailhog"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue