Add git to Dockerfiles

This commit is contained in:
Dustin Decker 2022-03-14 22:57:55 -07:00
parent e8234c3514
commit 5e64488e32
2 changed files with 5 additions and 8 deletions

View file

@ -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"]

View file

@ -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"]