Commit 9c830be 1 parent 0441dd4 commit 9c830be Copy full SHA for 9c830be
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2
2
# MailHog Dockerfile
3
3
#
4
4
5
- FROM golang:alpine
5
+ FROM golang:alpine as builder
6
6
7
7
# Install MailHog:
8
8
RUN apk --no-cache add --virtual build-dependencies \
9
9
git \
10
10
&& mkdir -p /root/gocode \
11
11
&& export GOPATH=/root/gocode \
12
- && go get github.com/mailhog/MailHog \
13
- && mv /root/gocode/bin/MailHog /usr/local/bin \
14
- && rm -rf /root/gocode \
15
- && apk del --purge build-dependencies
12
+ && go get github.com/mailhog/MailHog
16
13
14
+ FROM alpine:3
17
15
# Add mailhog user/group with uid/gid 1000.
18
16
# This is a workaround for boot2docker issue #581, see
19
17
# https://github.com/boot2docker/boot2docker/issues/581
20
18
RUN adduser -D -u 1000 mailhog
21
19
20
+ COPY --from=builder /root/gocode/bin/MailHog /usr/local/bin/
21
+
22
22
USER mailhog
23
23
24
24
WORKDIR /home/mailhog
You can’t perform that action at this time.
0 commit comments