Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions base/ubi10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,37 @@ RUN set -e; \
cd - >/dev/null; \
rm -rf "${TEMP_DIR}"

# Download and install OpenShell (NVIDIA) depending on the architecture.
# See release page for details https://github.com/NVIDIA/OpenShell/releases/tag/v0.0.78
RUN set -e; \
case "$TARGETARCH" in \
ppc64le) \
echo "Skipping OpenShell installation for ppc64le as binary not available"; \
exit 0 ;; \
amd64) \
OS_ARCH="x86_64" ;; \
arm64) \
OS_ARCH="aarch64" ;; \
*) \
echo "Unsupported architecture for OpenShell: $TARGETARCH"; \
exit 0 ;; \
esac; \
TEMP_DIR="$(mktemp -d)"; \
cd "${TEMP_DIR}"; \
OPENSHELL_VERSION="0.0.78"; \
OPENSHELL_RPM="openshell-${OPENSHELL_VERSION}-1.fc44.${OS_ARCH}.rpm"; \
OPENSHELL_GW_RPM="openshell-gateway-${OPENSHELL_VERSION}-1.fc44.${OS_ARCH}.rpm"; \
OPENSHELL_URL="https://github.com/NVIDIA/OpenShell/releases/download/v${OPENSHELL_VERSION}"; \
echo "Downloading OpenShell ${OPENSHELL_VERSION} ..."; \
if curl -fsSL "${OPENSHELL_URL}/${OPENSHELL_RPM}" -o "${OPENSHELL_RPM}" && \
curl -fsSL "${OPENSHELL_URL}/${OPENSHELL_GW_RPM}" -o "${OPENSHELL_GW_RPM}"; then \
rpm -ivh --nodeps "${OPENSHELL_RPM}" "${OPENSHELL_GW_RPM}"; \
else \
echo "OpenShell binary not found for ${TARGETARCH}, skipping installation."; \
fi; \
cd - >/dev/null; \
rm -rf "${TEMP_DIR}"

# Define user directory for binaries
ENV PATH="/home/user/.local/bin:$PATH"

Expand Down
31 changes: 31 additions & 0 deletions base/ubi9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,37 @@ RUN set -e; \
cd - >/dev/null; \
rm -rf "${TEMP_DIR}"

# Download and install OpenShell (NVIDIA) depending on the architecture.
# See release page for details https://github.com/NVIDIA/OpenShell/releases/tag/v0.0.78
RUN set -e; \
case "$TARGETARCH" in \
ppc64le) \
echo "Skipping OpenShell installation for ppc64le as binary not available"; \
exit 0 ;; \
amd64) \
OS_ARCH="x86_64" ;; \
arm64) \
OS_ARCH="aarch64" ;; \
*) \
echo "Unsupported architecture for OpenShell: $TARGETARCH"; \
exit 0 ;; \
esac; \
TEMP_DIR="$(mktemp -d)"; \
cd "${TEMP_DIR}"; \
OPENSHELL_VERSION="0.0.78"; \
OPENSHELL_RPM="openshell-${OPENSHELL_VERSION}-1.fc44.${OS_ARCH}.rpm"; \
OPENSHELL_GW_RPM="openshell-gateway-${OPENSHELL_VERSION}-1.fc44.${OS_ARCH}.rpm"; \
OPENSHELL_URL="https://github.com/NVIDIA/OpenShell/releases/download/v${OPENSHELL_VERSION}"; \
echo "Downloading OpenShell ${OPENSHELL_VERSION} ..."; \
if curl -fsSL "${OPENSHELL_URL}/${OPENSHELL_RPM}" -o "${OPENSHELL_RPM}" && \
curl -fsSL "${OPENSHELL_URL}/${OPENSHELL_GW_RPM}" -o "${OPENSHELL_GW_RPM}"; then \
rpm -ivh --nodeps "${OPENSHELL_RPM}" "${OPENSHELL_GW_RPM}"; \
else \
echo "OpenShell binary not found for ${TARGETARCH}, skipping installation."; \
fi; \
Comment on lines +196 to +201

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the relevant file and inspect the surrounding context.
git ls-files base/ubi9/Dockerfile
wc -l base/ubi9/Dockerfile
sed -n '160,220p' base/ubi9/Dockerfile

# Look for related OpenShell handling and any dnf/rpm install patterns in the repo.
rg -n "OPENSHELL_|rpm -ivh --nodeps|dnf install -y \"\./" base/ubi9/Dockerfile base -g 'Dockerfile' -g '*.sh' -g '*.yml' -g '*.yaml' -g '*.md'

Repository: devfile/developer-images

Length of output: 5235


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check whether OpenShell is referenced elsewhere as optional or required.
rg -n "OpenShell|openshell|gateway" . -g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**'

# Inspect the rest of the UBI9 Dockerfile for dnf usage patterns and whether package installs normally fail the build.
sed -n '1,160p' base/ubi9/Dockerfile
sed -n '160,260p' base/ubi9/Dockerfile

Repository: devfile/developer-images

Length of output: 13009


Fail the layer when OpenShell is unavailable
Supported amd64/arm64 builds can still succeed without OpenShell if either download fails, and rpm -ivh --nodeps skips dependency validation. Fail the build for supported arches and install the local RPMs with dnf instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@base/ubi9/Dockerfile` around lines 196 - 201, The OpenShell install block
currently swallows download failures for supported arches and uses rpm -ivh
--nodeps, which allows the layer to pass without a valid install. Update the
Dockerfile logic around the OPENSHELL_URL/OPENSHELL_RPM downloads so that amd64
and arm64 builds fail immediately if either RPM cannot be fetched, while
non-supported arches may still skip installation. Replace the rpm -ivh --nodeps
step with a dnf-based local RPM install so dependency validation is enforced
during the build.

cd - >/dev/null; \
rm -rf "${TEMP_DIR}"

# Define user directory for binaries
ENV PATH="/home/user/.local/bin:$PATH"

Expand Down
Loading