Dockerfile 516 B

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