mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-23 14:24:03 +00:00
Merge pull request #118 from blueimp/docker
Optimise the Dockerfile for Docker Hub Automated Builds.
This commit is contained in:
commit
e4fa51f6ae
2 changed files with 32 additions and 4 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
*
|
35
Dockerfile
35
Dockerfile
|
@ -1,7 +1,34 @@
|
|||
FROM golang:1.4
|
||||
#
|
||||
# MailHog Dockerfile
|
||||
#
|
||||
|
||||
RUN go get github.com/mailhog/MailHog
|
||||
FROM alpine:3.4
|
||||
|
||||
# Install ca-certificates, required for the "release message" feature:
|
||||
RUN apk --no-cache add \
|
||||
ca-certificates
|
||||
|
||||
# Install MailHog:
|
||||
RUN apk --no-cache add --virtual build-dependencies \
|
||||
go \
|
||||
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
|
||||
|
||||
WORKDIR /home/mailhog
|
||||
|
||||
ENTRYPOINT ["MailHog"]
|
||||
|
||||
# Expose the SMTP and HTTP ports:
|
||||
EXPOSE 1025 8025
|
||||
|
||||
ENTRYPOINT ["/go/bin/MailHog"]
|
||||
|
|
Loading…
Reference in a new issue