From 0d5b24b019fcbd6ec5997aa3cf9e11bec4a2ddd0 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 28 Jan 2022 11:40:33 +0100 Subject: [PATCH] Dockerfile.vendor: use GOPROXY=direct While the module proxy can speed up vendoring, it may cause issues when (temporarily) vendoring from a fork, because the proxy may not have the module yet on first try, which causes vendoring to fail: vendor.mod:95:2: replace github.com/thaJeztah/compose-on-kubernetes: version "0b59cf047b3b0199048fe13fdcd21b0cb46549f2" invalid: Get "https://proxy.golang.org/github.com/tha%21jeztah/compose-on-kubernetes/@v/0b59cf047b3b0199048fe13fdcd21b0cb46549f2.info": read tcp 172.17.0.2:60290->172.217.168.209:443: read: connection reset by peer Using `GOPROXY=direct` to fetch sources directly from upstream (GitHub) instead. Signed-off-by: Sebastiaan van Stijn --- dockerfiles/Dockerfile.vendor | 1 + 1 file changed, 1 insertion(+) diff --git a/dockerfiles/Dockerfile.vendor b/dockerfiles/Dockerfile.vendor index 237cb5100c..6d687c6378 100644 --- a/dockerfiles/Dockerfile.vendor +++ b/dockerfiles/Dockerfile.vendor @@ -8,6 +8,7 @@ RUN apk add --no-cache bash git rsync WORKDIR /src FROM base AS vendored +ENV GOPROXY=direct RUN --mount=target=/context \ --mount=target=.,type=tmpfs \ --mount=target=/go/pkg/mod,type=cache <