summaryrefslogtreecommitdiff
path: root/build/mailhog/Dockerfile
diff options
context:
space:
mode:
authorNaoaki Ueda <nao@uedder.com>2022-09-04 18:23:17 +0900
committerNaoaki Ueda <nao@uedder.com>2022-09-04 18:23:17 +0900
commit372de06b4363d38d92c503cc96103b6a879c2820 (patch)
tree8114a32239e3ad98d53284d31fc6ff7f6b2b27d2 /build/mailhog/Dockerfile
downloadwordpress-dev-372de06b4363d38d92c503cc96103b6a879c2820.tar.gz
wordpress-dev-372de06b4363d38d92c503cc96103b6a879c2820.tar.bz2
wordpress-dev-372de06b4363d38d92c503cc96103b6a879c2820.zip
Initial commit
Diffstat (limited to 'build/mailhog/Dockerfile')
-rw-r--r--build/mailhog/Dockerfile29
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