Skip to content

Commit

Permalink
Fix centOS 9 Stream
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelien Lun-Sin committed May 6, 2022
1 parent 4ed10b1 commit 6c2c805
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
13 changes: 12 additions & 1 deletion build-containerd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
Expand Down
11 changes: 10 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
Expand Down

0 comments on commit 6c2c805

Please sign in to comment.