diff options
Diffstat (limited to 'build/mailhog/Dockerfile')
-rw-r--r-- | build/mailhog/Dockerfile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/build/mailhog/Dockerfile b/build/mailhog/Dockerfile new file mode 100644 index 0000000..71d623b --- /dev/null +++ b/build/mailhog/Dockerfile @@ -0,0 +1,29 @@ +# +# MailHog Dockerfile +# + +FROM docker.io/library/golang:1.15-alpine as builder + +# Install MailHog: +RUN apk --no-cache add --virtual build-dependencies \ + git \ + && mkdir -p /root/gocode \ + && export GOPATH=/root/gocode \ + && go get github.com/mailhog/MailHog + +FROM docker.io/library/alpine:3 +# 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 + +COPY --from=builder /root/gocode/bin/MailHog /usr/local/bin/ + +USER mailhog + +WORKDIR /home/mailhog + +ENTRYPOINT ["MailHog"] + +# Expose the SMTP and HTTP ports: +EXPOSE 1025 8025 |