Skip to content

Commit fef78c1

Browse files
committed
install-runc: pin Go to 1.21
runc is incompatible with Go 1.22 on glibc-based distros (opencontainers/runc issue 4233) Signed-off-by: Akihiro Suda <[email protected]>
1 parent 7feb1f3 commit fef78c1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

script/setup/install-runc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,18 @@ function install_runc() {
3434
: "${RUNC_REPO:=https://github.com/opencontainers/runc.git}"
3535

3636
TMPROOT=$(mktemp -d)
37+
# runc is incompatible with Go 1.22 on glibc-based distros
38+
# https://github.com/opencontainers/runc/issues/4233
39+
GO121DIR="${TMPROOT}"/go121
40+
mkdir -p "${GO121DIR}"
41+
GOBIN="${GO121DIR}" go install golang.org/dl/go1.21.9@latest
42+
GO121="${GO121DIR}"/go1.21.9
43+
$GO121 download
3744
git clone "${RUNC_REPO}" "${TMPROOT}"/runc
3845
pushd "${TMPROOT}"/runc
3946
git checkout "${RUNC_VERSION}"
40-
make BUILDTAGS='seccomp' runc
41-
$SUDO make install
47+
make GO=$GO121 BUILDTAGS='seccomp' runc
48+
$SUDO make GO=$GO121 install
4249
popd
4350
rm -fR "${TMPROOT}"
4451
}

0 commit comments

Comments
 (0)