mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Update Dockerfiles (#324)
This commit is contained in:
parent
37fce75c4a
commit
9d8bfaef50
2 changed files with 15 additions and 11 deletions
17
Dockerfile
17
Dockerfile
|
@ -1,12 +1,13 @@
|
|||
FROM golang:bullseye as builder
|
||||
RUN mkdir /build
|
||||
COPY . /build
|
||||
WORKDIR /build
|
||||
RUN CGO_ENABLED=0 go build -a -o trufflehog main.go
|
||||
RUN mkdir /empty
|
||||
|
||||
FROM alpine
|
||||
RUN apk add git
|
||||
WORKDIR /build
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -a -o trufflehog main.go
|
||||
|
||||
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
|
||||
ENTRYPOINT ["/usr/bin/trufflehog"]
|
||||
ENTRYPOINT ["/usr/bin/trufflehog"]
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
FROM alpine
|
||||
RUN apk add git
|
||||
COPY trufflehog /usr/bin/trufflehog
|
||||
FROM alpine:3.15
|
||||
|
||||
RUN apk add --no-cache git
|
||||
WORKDIR /usr/bin/trufflehog
|
||||
COPY trufflehog .
|
||||
|
||||
ENTRYPOINT ["/usr/bin/trufflehog"]
|
||||
|
|
Loading…
Reference in a new issue