mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
18 lines
555 B
Docker
18 lines
555 B
Docker
FROM golang:1.13.4 AS build
|
|
WORKDIR /go/src/github.com/zricethezav/gitleaks
|
|
ARG ldflags
|
|
COPY . .
|
|
RUN GO111MODULE=on CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="${ldflags} *.go
|
|
|
|
FROM alpine:3.10
|
|
RUN apk add --no-cache bash git openssh
|
|
COPY --from=build /go/src/github.com/zricethezav/gitleaks/bin/* /usr/bin/
|
|
ENTRYPOINT ["gitleaks"]
|
|
|
|
# How to use me :
|
|
|
|
# docker build -t gitleaks .
|
|
# docker run --rm --name=gitleaks gitleaks --repo=https://github.com/zricethezav/gitleaks
|
|
|
|
# This will check for secrets in https://github.com/zricethezav/gitleaks
|