Skip to content

Commit 3eba7b8

Browse files
authored
add openssh to docker image (#719)
I'm trying to scan a project which has dependencies which are private projects. When Go tries to fetch the dependencies it normally uses HTTPS, but that doesn't work if they're private (terminal prompts disabled, can't enter username/password). So you do this little trick with git configuration to get Go to fetch dependencies over ssh: `GIT_CONFIG_PARAMETERS=url.ssh://[email protected]/.insteadOf=https://github.com/` unfortunately the docker image doesn't have ssh installed so this doesn't work :)
1 parent 55c6cea commit 3eba7b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN go mod download
88
RUN make build-linux
99

1010
FROM golang:${GO_VERSION}-alpine
11-
RUN apk add --update --no-cache ca-certificates bash git gcc libc-dev
11+
RUN apk add --update --no-cache ca-certificates bash git gcc libc-dev openssh
1212
ENV GO111MODULE on
1313
COPY --from=builder /build/gosec /bin/gosec
1414
COPY entrypoint.sh /bin/entrypoint.sh

0 commit comments

Comments
 (0)