1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #42194 from thaJeztah/20.10_backport_rootlesskit_goproxy

[20.10 backport] hack: use GOPROXY for rootlesskit to workaround issue with old git on CentOS/RHEL 7
This commit is contained in:
Sebastiaan van Stijn 2021-03-25 20:55:02 +01:00 committed by GitHub
commit eef17706da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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