Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
refactor: improved Dockerfile (#672)
Adrian Gąsior0752503872c8
diff --git a/Dockerfile b/Dockerfileindex cb910ff88..8fc4eac6c 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,13 +1,16 @@-FROM golang:bullseye as builder+FROM --platform=${BUILDPLATFORM} golang:bullseye as builderWORKDIR /build-COPY go.mod go.sum ./-RUN go mod downloadCOPY . .-RUN CGO_ENABLED=0 go build -a -o trufflehog main.go+ENV CGO_ENABLED=0+ARG TARGETOS TARGETARCH+RUN --mount=type=cache,target=/go/pkg/mod \+ --mount=type=cache,target=/root/.cache/go-build \+ GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o trufflehog .FROM alpine:3.15RUN apk add --no-cache gitCOPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crtCOPY --from=builder /build/trufflehog /usr/bin/trufflehogENTRYPOINT ["/usr/bin/trufflehog"]+