Dockerfile 555 B

1234567891011121314151617
  1. FROM golang:1.14.1 AS build
  2. WORKDIR /go/src/github.com/zricethezav/gitleaks
  3. ARG ldflags
  4. COPY . .
  5. RUN GO111MODULE=on CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="${ldflags} *.go
  6. FROM alpine:3.11
  7. RUN apk add --no-cache bash git openssh
  8. COPY --from=build /go/src/github.com/zricethezav/gitleaks/bin/* /usr/bin/
  9. ENTRYPOINT ["gitleaks"]
  10. # How to use me :
  11. # docker build -t gitleaks .
  12. # docker run --rm --name=gitleaks gitleaks --repo=https://github.com/zricethezav/gitleaks
  13. # This will check for secrets in https://github.com/zricethezav/gitleaks