MailHog/Dockerfile

30 lines
650 B
Text
Raw Normal View History

#
# MailHog Dockerfile
#
2014-10-29 17:01:13 +00:00
2018-01-25 22:45:20 +00:00
FROM golang:alpine
# 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 \
&& mv /root/gocode/bin/MailHog /usr/local/bin \
&& rm -rf /root/gocode \
&& apk del --purge build-dependencies
# 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
USER mailhog
2014-10-29 17:01:13 +00:00
WORKDIR /home/mailhog
ENTRYPOINT ["MailHog"]
# Expose the SMTP and HTTP ports:
EXPOSE 1025 8025