Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 2d411bc

Browse files
author
Tibor Vass
committed
hack: use GOPROXY for rootlesskit to workaround issue with old git on CentOS/RHEL 7
Since rootlesskit removed vendor folder, building it has to rely on go mod. Dockerfile in docker-ce-packaging uses GOPROXY=direct, which makes "go mod" commands use git to fetch modules. "go mod" in Go versions before 1.14.1 are incompatible with older git versions, including the version of git that ships with CentOS/RHEL 7 (which have git 1.8), see golang/go#38373 This patch switches rootlesskit install script to set GOPROXY to https://proxy.golang.org so that git is not required for downloading modules. Once all our code has upgraded to Go 1.14+, this workaround should be removed. Signed-off-by: Tibor Vass <[email protected]> Upstream-commit: cbc6cefdcbe8b7ab66571407ee0b3c39f1e7a96b Component: engine
1 parent a131d80 commit 2d411bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/engine/hack/dockerfile/install/rootlesskit.installer

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ _install_rootlesskit() (
3131
cd "$GOPATH/src/github.com/rootless-containers/rootlesskit" || exit 1
3232
git checkout -q "$ROOTLESSKIT_COMMIT"
3333
export GO111MODULE=on
34+
# TODO remove GOPROXY override once we updated to Go 1.14+
35+
# Using goproxy instead of "direct" to work around an issue in go mod
36+
# on Go 1.13 not working with older git versions (default version on
37+
# CentOS 7 is git 1.8), see https://github.com/golang/go/issues/38373
38+
export GOPROXY="https://proxy.golang.org"
3439
for f in rootlesskit rootlesskit-docker-proxy; do
3540
go build $BUILD_MODE -ldflags="$ROOTLESSKIT_LDFLAGS" -o "${PREFIX}/$f" github.com/rootless-containers/rootlesskit/cmd/$f
3641
done

0 commit comments

Comments
 (0)