From ade0366cd39a5a837351fdc62ec12580afc72a23 Mon Sep 17 00:00:00 2001 From: Johannes Schnatterer Date: Thu, 26 Oct 2023 12:16:15 +0200 Subject: [PATCH] Ship in scratch container Skip vulns introduced by alpine --- Dockerfile | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5625b64..0a82d08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ No newline at end of file +EXPOSE 1025 8025 + +COPY --from=builder /root/gocode/bin/MailHog /usr/local/bin/ \ No newline at end of file