From 0f3110b54ccd6e0eb3ef178bd93abfc78f39f55c Mon Sep 17 00:00:00 2001 From: Jatin Suri Date: Mon, 23 Feb 2026 16:06:16 -0500 Subject: [PATCH] Update Dockerfile to work on CentOS/RHEL 10 --- Dockerfile.rhel8 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile.rhel8 b/Dockerfile.rhel8 index 70b18d2983..4e3564baef 100644 --- a/Dockerfile.rhel8 +++ b/Dockerfile.rhel8 @@ -4,9 +4,17 @@ COPY . . RUN hack/build.sh FROM registry.ci.openshift.org/ocp/4.22:base-rhel9 -RUN INSTALL_PKGS=" \ +RUN . /etc/os-release && \ + MAJOR_VERSION=$(echo "${VERSION_ID}" | cut -d. -f1) && \ + CONTAINER_RUNTIME=runc && \ + # CentOS/RHEL 10 does not have runc as a package, so replace with crun + # Remove when base image is upgraded to RHEL 10 + if [ "${MAJOR_VERSION}" = "10" ]; then \ + CONTAINER_RUNTIME=crun; \ + fi && \ + INSTALL_PKGS=" \ bind-utils bsdtar findutils fuse-overlayfs git git-lfs hostname lsof \ - netavark procps-ng runc socat tar util-linux wget which \ + netavark procps-ng ${CONTAINER_RUNTIME} socat tar util-linux wget which \ " && \ yum install -y --setopt=skip_missing_names_on_install=False $INSTALL_PKGS && \ yum clean all