diff --git a/docker/Dockerfile.gitrpc b/docker/Dockerfile.gitrpc index aee89907f..65ee0a277 100644 --- a/docker/Dockerfile.gitrpc +++ b/docker/Dockerfile.gitrpc @@ -2,11 +2,16 @@ FROM golang:1.19-alpine as builder RUN apk update \ - && apk add --no-cache protoc build-base + && apk add --no-cache protoc build-base git # Setup workig dir WORKDIR /app +# Access to private repos +ARG GITHUB_ACCESS_TOKEN +RUN git config --global url."https://${GITHUB_ACCESS_TOKEN}:x-oauth-basic@github.com/harness".insteadOf "https://github.com/harness" +RUN go env -w GOPRIVATE=github.com/harness/* + # Get dependancies - will also be cached if we won't change mod/sum COPY go.mod . COPY go.sum .