-
Notifications
You must be signed in to change notification settings - Fork 124
RHAIENG-2042: fixup(base-images): add TARGETARCH as an argument to ubi9-python-3.12 Dockerfile
#2695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
RHAIENG-2042: fixup(base-images): add TARGETARCH as an argument to ubi9-python-3.12 Dockerfile
#2695
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @coderabbitai as expected, this fails on
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: Length of output: 9069 🏁 Script executed: Length of output: 94 🏁 Script executed: Length of output: 2395 🏁 Script executed: Length of output: 71 @jiridanek The issue is clear from the The script assumes it's running on CentOS Stream 9 where the Here are a few solutions: Option 1: Detect the OS and conditionally enable crb Modify function install_csb() {
dnf install "${DNF_OPTS[@]}" dnf-plugins-core
# Only enable crb on CentOS Stream, not on UBI
if grep -q "CentOS Stream" /etc/os-release; then
dnf config-manager --set-enabled crb
fi
}Option 2: Check if the repository exists before enabling function install_csb() {
dnf install "${DNF_OPTS[@]}" dnf-plugins-core
# Only enable crb if it exists
if dnf repolist --all | grep -q "^crb"; then
dnf config-manager --set-enabled crb
fi
}Option 3: Pass an environment variable from the Dockerfile Set a variable in the ubi9 Dockerfile to indicate it's UBI9, and check it in the script. The first option is probably the cleanest since it explicitly handles the different base images. Would you like me to prepare a patch for |
||
| EOF | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Clarify the shift of CRB enablement from script to Dockerfile.
The addition of
/usr/bin/crb enabledirectly in the Dockerfile (lines 66-69) indicates that codeready-builder enablement has been moved from the aipcc.sh script (whereinstall_csb()was presumably called). This is a functional shift that should be validated:install_csb()function has been removed frombase-images/utils/aipcc.shcrb enabledirectly in the Dockerfile does not conflict with any invocations in the script🏁 Script executed:
Length of output: 0
I need to gather more information about the repository structure and file contents since the initial search produced no output.
🏁 Script executed:
Length of output: 303
🏁 Script executed:
Length of output: 796
🏁 Script executed:
Length of output: 742
Address inconsistency: crb enable missing from ubi9 variant.
The verification confirms a significant inconsistency between the c9s and ubi9 variants:
/usr/bin/crb enablebefore calling/mnt/aipcc.shcrb enablecall presentThe original concerns were validated:
install_csb()confirmed removed frombase-images/utils/aipcc.shcrb enablecalls in the scriptEither add
/usr/bin/crb enableto the ubi9 Dockerfile (before calling/mnt/aipcc.sh) for consistency, or document why ubi9 differs from c9s.🤖 Prompt for AI Agents