From 33d39691f61693512fd5fdc5f843040e0ff1c678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Thu, 20 Nov 2025 09:42:31 +0100 Subject: [PATCH] RHAIENG-2042: chore(base-images): add `TARGETARCH` as an argument to `ubi9-python-3.12` Dockerfile The c9s PR did not trigger building the ubi9 version, so I missed on the fact that changes are needed there. It seems reasonable to remove the ubi9 base image as it is unused and only leave c9s. But I don't want to do it right now, first I will make it work and then make it go away. --- base-images/cpu/c9s-python-3.12/Dockerfile.cpu | 4 ++++ base-images/cpu/ubi9-python-3.12/Dockerfile.cpu | 2 ++ base-images/utils/aipcc.sh | 10 ---------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/base-images/cpu/c9s-python-3.12/Dockerfile.cpu b/base-images/cpu/c9s-python-3.12/Dockerfile.cpu index 3c0172e814..3dbe6f2ebb 100644 --- a/base-images/cpu/c9s-python-3.12/Dockerfile.cpu +++ b/base-images/cpu/c9s-python-3.12/Dockerfile.cpu @@ -63,6 +63,10 @@ RUN \ --mount=type=cache,sharing=locked,id=dnf-c9s,target=/var/cache/dnf \ /bin/bash <<'EOF' set -Eeuxo pipefail +# AIPCC bases enable codeready-builder, so we need to do the CentOS equivalent +# In RHEL this is codeready-builder-for-rhel-${RELEASEVER_MAJOR}-${ARCH}-eus-rpms +# or codeready-builder-for-rhel-${RELEASEVER_MAJOR}-${ARCH}-rpms +/usr/bin/crb enable /mnt/aipcc.sh fix-permissions ${APP_ROOT} -P EOF diff --git a/base-images/cpu/ubi9-python-3.12/Dockerfile.cpu b/base-images/cpu/ubi9-python-3.12/Dockerfile.cpu index 86d5ff51c6..e91b0bb0e2 100644 --- a/base-images/cpu/ubi9-python-3.12/Dockerfile.cpu +++ b/base-images/cpu/ubi9-python-3.12/Dockerfile.cpu @@ -10,10 +10,12 @@ FROM registry.access.redhat.com/ubi9/python-312:latest AS base USER 0 +ARG TARGETARCH RUN \ --mount=from=buildscripts,source=/mnt,target=/mnt \ --mount=type=cache,sharing=locked,id=dnf-ubi9,target=/var/cache/dnf \ /bin/bash <<'EOF' +export TARGETARCH=$TARGETARCH /mnt/aipcc.sh EOF diff --git a/base-images/utils/aipcc.sh b/base-images/utils/aipcc.sh index a4468bdf50..327ec85e30 100755 --- a/base-images/utils/aipcc.sh +++ b/base-images/utils/aipcc.sh @@ -335,14 +335,6 @@ function uninstall_epel() { dnf remove "${DNF_OPTS[@]}" epel-release } -# AIPCC bases enable codeready-builder, so we need to do the CentOS equivalent -# In RHEL this is codeready-builder-for-rhel-${RELEASEVER_MAJOR}-${ARCH}-eus-rpms -# or codeready-builder-for-rhel-${RELEASEVER_MAJOR}-${ARCH}-rpms -function install_csb() { - dnf install "${DNF_OPTS[@]}" dnf-plugins-core - dnf config-manager --set-enabled crb -} - # create Python virtual env and update pip inside the venv function install_python_venv() { # install venv with bundled pip (no --upgrade-deps) @@ -354,8 +346,6 @@ function install_python_venv() { } function main() { - install_csb - install_epel # install security updates