Skip to content

Commit

Permalink
Ship in scratch container
Browse files Browse the repository at this point in the history
Skip vulns introduced by alpine
  • Loading branch information
schnatterer committed Oct 26, 2023
1 parent bf9db4e commit ade0366
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,12 @@ ENV GOOS=linux
RUN go build -ldflags "-X main.version=$VERSION" -o $GOPATH/bin/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
FROM scratch
USER 1000

ENTRYPOINT ["MailHog"]

# Expose the SMTP and HTTP ports:
EXPOSE 1025 8025
EXPOSE 1025 8025

COPY --from=builder /root/gocode/bin/MailHog /usr/local/bin/

0 comments on commit ade0366

Please sign in to comment.