From 5e64488e32eb5b02593339e21f89e18a304401ca Mon Sep 17 00:00:00 2001 From: Dustin Decker Date: Mon, 14 Mar 2022 22:57:55 -0700 Subject: [PATCH] Add git to Dockerfiles --- Dockerfile | 4 ++-- Dockerfile.goreleaser | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5439bcf39..1c6721be9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,8 @@ WORKDIR /build RUN CGO_ENABLED=0 go build -a -o trufflehog main.go RUN mkdir /empty -FROM scratch -COPY --from=builder /empty /tmp +FROM alpine +RUN apk add git COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=builder /build/trufflehog /usr/bin/trufflehog ENTRYPOINT ["/usr/bin/trufflehog"] \ No newline at end of file diff --git a/Dockerfile.goreleaser b/Dockerfile.goreleaser index 7a8ef0ba6..9c9ec4de9 100644 --- a/Dockerfile.goreleaser +++ b/Dockerfile.goreleaser @@ -1,8 +1,5 @@ -FROM golang:bullseye as builder -RUN mkdir /empty - -FROM scratch -COPY --from=builder /empty /tmp +FROM alpine +RUN apk add git COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY trufflehog /usr/bin/trufflehog +COPY --from=builder /build/trufflehog /usr/bin/trufflehog ENTRYPOINT ["/usr/bin/trufflehog"] \ No newline at end of file