2022-01-19 00:59:18 +00:00
|
|
|
FROM golang:bullseye as builder
|
2022-04-08 21:06:09 +00:00
|
|
|
|
2022-01-19 00:59:18 +00:00
|
|
|
WORKDIR /build
|
2022-04-08 21:06:09 +00:00
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
2022-01-19 00:59:18 +00:00
|
|
|
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
|
2022-01-19 00:59:18 +00:00
|
|
|
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"]
|