Skip to content

Commit

Permalink
Merge branch 'feature/multiStageBuild' of https://github.com/marcdeop…
Browse files Browse the repository at this point in the history
  • Loading branch information
gedge committed Sep 29, 2021
2 parents fce4aa5 + 9c830be commit 0670c22
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
# MailHog Dockerfile
#

FROM golang:alpine
FROM golang: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 \
&& mv /root/gocode/bin/MailHog /usr/local/bin \
&& rm -rf /root/gocode \
&& apk del --purge build-dependencies
&& go get github.com/mailhog/MailHog

FROM 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
Expand Down

0 comments on commit 0670c22

Please sign in to comment.