diff --git a/build-containerd.sh b/build-containerd.sh index 48b94e93..d3f74030 100755 --- a/build-containerd.sh +++ b/build-containerd.sh @@ -46,7 +46,8 @@ buildContainerd() { DISTRO_VERS="$(cut -d'-' -f2 <<<"${DISTRO}")" TARGET="docker.io/library/${DISTRO_NAME}:${DISTRO_VERS}" - if [[ "${DISTRO_NAME}:${DISTRO_VERS}" == centos:8* ]] + + if [[ "${DISTRO_NAME}:${DISTRO_VERS}" == centos:8 ]] then ## # Switch to quay.io for CentOS 8 stream @@ -55,6 +56,16 @@ buildContainerd() { echo "Switching to CentOS 8 stream and using quay.io" TARGET="quay.io/centos/centos:stream8" + + elif [[ "${DISTRO_NAME}:${DISTRO_VERS}" == centos:9 ]] + then + ## + # Switch to quay.io for CentOS 9 stream + # See https://github.com/docker/containerd-packaging/pull/283 + ## + echo "Switching to CentOS 9 stream and using quay.io" + + TARGET="quay.io/centos/centos:stream9" fi MAKE_OPTS="REF=${CONTAINERD_VERS}" diff --git a/test.sh b/test.sh index 49e1884a..3fd64899 100755 --- a/test.sh +++ b/test.sh @@ -90,7 +90,7 @@ testDynamicPackages() { echo "### # Building the test image: ${IMAGE_NAME} # ###" # Building the test image - if [[ "${DISTRO_NAME}:${DISTRO_VERS}" == centos:8* ]] + if [[ "${DISTRO_NAME}:${DISTRO_VERS}" == centos:8 ]] then ## # Switch to quay.io for CentOS 8 stream @@ -99,6 +99,15 @@ testDynamicPackages() { ## echo "Temporary fix: patching Dockerfile for using CentOS 8 stream and quay.io " sed -i 's/FROM ppc64le.*/FROM quay.io\/centos\/centos\:stream8/g' Dockerfile + + elif [[ "${DISTRO_NAME}:${DISTRO_VERS}" == centos:9 ]] + then + ## + # Switch to quay.io for CentOS 8 stream + # See https://github.com/docker/containerd-packaging/pull/283 + ## + echo "Temporary fix: patching Dockerfile for using CentOS 9 stream and quay.io " + sed -i 's/FROM ppc64le.*/FROM quay.io\/centos\/centos\:stream9/g' Dockerfile fi BUILD_ARGS="--build-arg DISTRO_NAME=${DISTRO_NAME} --build-arg DISTRO_VERS=${DISTRO_VERS}"