Loading build/Dockerfile +15 −4 Changes for build/Dockerfile: 15 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -9,16 +9,27 @@ ARG CI_SERVER_HOST WORKDIR /app # Private modules bypass the proxy; public modules use the cached proxy ENV GOPRIVATE="${CI_SERVER_HOST}/*" ENV GONOSUMDB="${CI_SERVER_HOST}/*" ENV GOPRIVATE="${CI_SERVER_HOST}/rep/*" ENV GONOSUMDB="${CI_SERVER_HOST}/rep/*" ENV GOPROXY="https://proxy.golang.org,direct" # Setup .netrc using the server host and credentials RUN echo "machine ${CI_SERVER_HOST} login ${USERNAME} password ${PASSWORD}" > /root/.netrc && \ chmod 600 /root/.netrc chmod 600 /root/.netrc && \ git config --global url."https://${USERNAME}:${PASSWORD}@${CI_SERVER_HOST}/rep/".insteadOf "https://${CI_SERVER_HOST}/rep/" && \ go env -w \ GOPRIVATE="${CI_SERVER_HOST}/rep/*" \ GONOSUMDB="${CI_SERVER_HOST}/rep/*" \ GOPROXY="https://proxy.golang.org,direct" COPY go.mod go.sum ./ RUN go mod download RUN go clean -modcache && \ go mod download COPY . ./ # Build the binary with CGO disabled for Linux Loading Loading
build/Dockerfile +15 −4 Changes for build/Dockerfile: 15 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -9,16 +9,27 @@ ARG CI_SERVER_HOST WORKDIR /app # Private modules bypass the proxy; public modules use the cached proxy ENV GOPRIVATE="${CI_SERVER_HOST}/*" ENV GONOSUMDB="${CI_SERVER_HOST}/*" ENV GOPRIVATE="${CI_SERVER_HOST}/rep/*" ENV GONOSUMDB="${CI_SERVER_HOST}/rep/*" ENV GOPROXY="https://proxy.golang.org,direct" # Setup .netrc using the server host and credentials RUN echo "machine ${CI_SERVER_HOST} login ${USERNAME} password ${PASSWORD}" > /root/.netrc && \ chmod 600 /root/.netrc chmod 600 /root/.netrc && \ git config --global url."https://${USERNAME}:${PASSWORD}@${CI_SERVER_HOST}/rep/".insteadOf "https://${CI_SERVER_HOST}/rep/" && \ go env -w \ GOPRIVATE="${CI_SERVER_HOST}/rep/*" \ GONOSUMDB="${CI_SERVER_HOST}/rep/*" \ GOPROXY="https://proxy.golang.org,direct" COPY go.mod go.sum ./ RUN go mod download RUN go clean -modcache && \ go mod download COPY . ./ # Build the binary with CGO disabled for Linux Loading