mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
Merge pull request #51 from petermbenjamin/update-dockerfile
Update Dockerfile
This commit is contained in:
1 file changed
+5
-18
+5
-18
@@ -1,24 +1,11 @@
|
|||||||
FROM golang:1.10.0 AS build
|
FROM golang:1.10.0 AS build
|
||||||
|
WORKDIR /go/src/github.com/zricethezav/gitleaks
|
||||||
ENV PROJECT /go/src/github.com/zricethezav/gitleaks
|
COPY . .
|
||||||
|
RUN CGO_ENABLED=0 go build -o bin/gitleaks *.go
|
||||||
RUN mkdir -p $PROJECT
|
|
||||||
|
|
||||||
WORKDIR ${PROJECT}
|
|
||||||
|
|
||||||
RUN git clone https://github.com/zricethezav/gitleaks.git . \
|
|
||||||
&& CGO_ENABLED=0 go build -o bin/gitleaks *.go
|
|
||||||
|
|
||||||
FROM alpine:3.7
|
FROM alpine:3.7
|
||||||
|
RUN apk add --no-cache bash git openssh
|
||||||
ENV PROJECT /go/src/github.com/zricethezav/gitleaks
|
COPY --from=build /go/src/github.com/zricethezav/gitleaks/bin/* /usr/bin/
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
RUN apk update && apk upgrade && apk add --no-cache bash git openssh
|
|
||||||
|
|
||||||
COPY --from=build $PROJECT/bin/* /usr/bin/
|
|
||||||
|
|
||||||
ENTRYPOINT ["gitleaks"]
|
ENTRYPOINT ["gitleaks"]
|
||||||
|
|
||||||
# How to use me :
|
# How to use me :
|
||||||
|
|||||||
Reference in new issue
Block a user