diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/mailhog/Dockerfile | 29 | ||||
-rw-r--r-- | build/web/Dockerfile | 7 |
2 files changed, 36 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 diff --git a/build/web/Dockerfile b/build/web/Dockerfile new file mode 100644 index 0000000..d4dc1c2 --- /dev/null +++ b/build/web/Dockerfile @@ -0,0 +1,7 @@ +ARG WP_IMAGE_TAG=latest +FROM docker.io/library/wordpress:${WP_IMAGE_TAG} + +# Install mhsendmail +RUN curl -sS https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 -L -o /usr/local/bin/mhsendmail \ + && chmod +x /usr/local/bin/mhsendmail \ + && echo 'sendmail_path = "/usr/local/bin/mhsendmail --smtp-addr=127.0.0.1:1025"' > /usr/local/etc/php/conf.d/sendmail.ini |