trufflehog/Dockerfile

14 lines
380 B
Docker
Raw Normal View History

FROM golang:bullseye as builder
2022-04-08 21:06:09 +00:00
WORKDIR /build
2022-04-08 21:06:09 +00:00
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -a -o trufflehog main.go
2022-04-08 21:06:09 +00:00
FROM alpine:3.15
RUN apk add --no-cache git
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /build/trufflehog /usr/bin/trufflehog
2022-04-08 21:06:09 +00:00
ENTRYPOINT ["/usr/bin/trufflehog"]