2016-10-23 10:42:22 +00:00
|
|
|
#
|
|
|
|
# MailHog Dockerfile
|
|
|
|
#
|
2014-10-29 17:01:13 +00:00
|
|
|
|
2022-03-17 19:15:45 +00:00
|
|
|
FROM golang:1.18-alpine as builder
|
2016-10-23 10:42:22 +00:00
|
|
|
|
|
|
|
# Install MailHog:
|
|
|
|
RUN apk --no-cache add --virtual build-dependencies \
|
|
|
|
git \
|
|
|
|
&& mkdir -p /root/gocode \
|
|
|
|
&& export GOPATH=/root/gocode \
|
2022-03-17 19:15:45 +00:00
|
|
|
&& go install github.com/mailhog/MailHog@latest
|
2016-10-23 10:42:22 +00:00
|
|
|
|
2020-09-30 14:49:03 +00:00
|
|
|
FROM alpine:3
|
2016-10-23 10:42:22 +00:00
|
|
|
# Add mailhog user/group with uid/gid 1000.
|
|
|
|
# This is a workaround for boot2docker issue #581, see
|
|
|
|
# https://github.com/boot2docker/boot2docker/issues/581
|
|
|
|
RUN adduser -D -u 1000 mailhog
|
|
|
|
|
2020-09-30 14:49:03 +00:00
|
|
|
COPY --from=builder /root/gocode/bin/MailHog /usr/local/bin/
|
|
|
|
|
2016-10-23 10:42:22 +00:00
|
|
|
USER mailhog
|
2014-10-29 17:01:13 +00:00
|
|
|
|
2016-10-23 10:42:22 +00:00
|
|
|
WORKDIR /home/mailhog
|
|
|
|
|
|
|
|
ENTRYPOINT ["MailHog"]
|
|
|
|
|
|
|
|
# Expose the SMTP and HTTP ports:
|
|
|
|
EXPOSE 1025 8025
|