Merge pull request #51 from petermbenjamin/update-dockerfile

Update Dockerfile
This commit is contained in:
Zachary Rice authored and GitHub committed 2018-02-28 23:36:33 -06:00
commit 17efe94f95
1 file changed
+5 -18
+5 -18
View File
@@ -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 :