mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
Update alpine, use gitleaks user instead of root (#615)
* Updating alpine, use gitleaks user instead of root * remove comments
This commit is contained in:
1 parent
a32ef6afc4
commit
3c1751e5c4
1 file changed
+4
-9
+4
-9
@@ -4,14 +4,9 @@ ARG ldflags
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN GO111MODULE=on CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="${ldflags} *.go
|
RUN GO111MODULE=on CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="${ldflags} *.go
|
||||||
|
|
||||||
FROM alpine:3.11
|
FROM alpine:3.14.1
|
||||||
RUN apk add --no-cache bash git openssh
|
RUN adduser -D gitleaks && \
|
||||||
|
apk add --no-cache bash git openssh-client
|
||||||
COPY --from=build /go/src/github.com/zricethezav/gitleaks/bin/* /usr/bin/
|
COPY --from=build /go/src/github.com/zricethezav/gitleaks/bin/* /usr/bin/
|
||||||
|
USER gitleaks
|
||||||
ENTRYPOINT ["gitleaks"]
|
ENTRYPOINT ["gitleaks"]
|
||||||
|
|
||||||
# How to use me :
|
|
||||||
|
|
||||||
# docker build -t gitleaks .
|
|
||||||
# docker run --rm --name=gitleaks gitleaks --repo-url=https://github.com/zricethezav/gitleaks
|
|
||||||
|
|
||||||
# This will check for secrets in https://github.com/zricethezav/gitleaks
|
|
||||||
Reference in new issue
Block a user