Skip to content

Commit 33d3969

Browse files
committed
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.
1 parent 3d73bd7 commit 33d3969

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

base-images/cpu/c9s-python-3.12/Dockerfile.cpu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ RUN \
6363
--mount=type=cache,sharing=locked,id=dnf-c9s,target=/var/cache/dnf \
6464
/bin/bash <<'EOF'
6565
set -Eeuxo pipefail
66+
# AIPCC bases enable codeready-builder, so we need to do the CentOS equivalent
67+
# In RHEL this is codeready-builder-for-rhel-${RELEASEVER_MAJOR}-${ARCH}-eus-rpms
68+
# or codeready-builder-for-rhel-${RELEASEVER_MAJOR}-${ARCH}-rpms
69+
/usr/bin/crb enable
6670
/mnt/aipcc.sh
6771
fix-permissions ${APP_ROOT} -P
6872
EOF

base-images/cpu/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ FROM registry.access.redhat.com/ubi9/python-312:latest AS base
1010

1111
USER 0
1212

13+
ARG TARGETARCH
1314
RUN \
1415
--mount=from=buildscripts,source=/mnt,target=/mnt \
1516
--mount=type=cache,sharing=locked,id=dnf-ubi9,target=/var/cache/dnf \
1617
/bin/bash <<'EOF'
18+
export TARGETARCH=$TARGETARCH
1719
/mnt/aipcc.sh
1820
EOF
1921

base-images/utils/aipcc.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,6 @@ function uninstall_epel() {
335335
dnf remove "${DNF_OPTS[@]}" epel-release
336336
}
337337

338-
# AIPCC bases enable codeready-builder, so we need to do the CentOS equivalent
339-
# In RHEL this is codeready-builder-for-rhel-${RELEASEVER_MAJOR}-${ARCH}-eus-rpms
340-
# or codeready-builder-for-rhel-${RELEASEVER_MAJOR}-${ARCH}-rpms
341-
function install_csb() {
342-
dnf install "${DNF_OPTS[@]}" dnf-plugins-core
343-
dnf config-manager --set-enabled crb
344-
}
345-
346338
# create Python virtual env and update pip inside the venv
347339
function install_python_venv() {
348340
# install venv with bundled pip (no --upgrade-deps)
@@ -354,8 +346,6 @@ function install_python_venv() {
354346
}
355347

356348
function main() {
357-
install_csb
358-
359349
install_epel
360350

361351
# install security updates

0 commit comments

Comments
 (0)