From 4fbd385825b4f7485483e68e04492382680529bd Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Wed, 28 Jan 2026 23:45:43 +0530 Subject: [PATCH 1/2] chore : Add interactive build and push commands to devfile Signed-off-by: Rohan Kumar --- .devfile.yaml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.devfile.yaml b/.devfile.yaml index 790ddf1f..6c6d6068 100644 --- a/.devfile.yaml +++ b/.devfile.yaml @@ -10,3 +10,48 @@ components: image: quay.io/devfile/universal-developer-image:ubi9-latest memoryLimit: 6Gi memoryRequest: 256Mi +commands: + - id: build-and-push-base-image + exec: + label: "1. Build and push base developer image" + component: devtools + workingDir: ${PROJECT_SOURCE} + commandLine: | + export DOCKER=podman && + read -p "ENTER UBI version (ubi9 or ubi10): " UBI_VERSION && + read -p "ENTER container registry org (e.g. quay.io/devfile): " IMG_REPO && + read -p "ENTER image tag (e.g. ubi9-latest): " IMG_TAG && + read -p "ENTER platform (leave empty for default, or linux/amd64, linux/arm64): " PLATFORM && + export IMG_NAME=${IMG_REPO}/base-developer-image:${IMG_TAG} && + cd base/${UBI_VERSION} && + if [ -z "$PLATFORM" ]; then + ${DOCKER} build --progress=plain -t ${IMG_NAME} . + else + ${DOCKER} build --platform ${PLATFORM} --progress=plain -t ${IMG_NAME} . + fi && + ${DOCKER} push ${IMG_NAME} + group: + kind: build + isDefault: false + - id: build-and-push-universal-image + exec: + label: "2. Build and push universal developer image" + component: devtools + workingDir: ${PROJECT_SOURCE} + commandLine: | + export DOCKER=podman && + read -p "ENTER UBI version (ubi9 or ubi10): " UBI_VERSION && + read -p "ENTER container registry org (e.g. quay.io/devfile): " IMG_REPO && + read -p "ENTER image tag (e.g. ubi9-latest): " IMG_TAG && + read -p "ENTER platform (leave empty for default, or linux/amd64, linux/arm64): " PLATFORM && + export IMG_NAME=${IMG_REPO}/universal-developer-image:${IMG_TAG} && + cd universal/${UBI_VERSION} && + if [ -z "$PLATFORM" ]; then + ${DOCKER} build --progress=plain -t ${IMG_NAME} . + else + ${DOCKER} build --platform ${PLATFORM} --progress=plain -t ${IMG_NAME} . + fi && + ${DOCKER} push ${IMG_NAME} + group: + kind: build + isDefault: true From ed0b8bfea8021176c8f7a9eb3de7f37a916b9d83 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Tue, 3 Feb 2026 17:41:16 +0530 Subject: [PATCH 2/2] fix (base/ubi10): remove dnf update and shadow-utils reinstall for base UBI 10 Dockerfile UBI images can contain preinstalled packages that are not reinstallable from enabled repositories, which causes `dnf reinstall shadow-utils` to fail in Eclipse Che / OpenShift environments. Additionally, removing the final `dnf update` avoids pulling inconsistent package sets during container builds and improves reproducibility across local and cloud-based development environments. Signed-off-by: Rohan Kumar --- base/ubi10/Dockerfile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/base/ubi10/Dockerfile b/base/ubi10/Dockerfile index 1a74500a..cf971ec2 100644 --- a/base/ubi10/Dockerfile +++ b/base/ubi10/Dockerfile @@ -27,13 +27,16 @@ RUN mkdir -p /home/tooling/ ## install packages from epel 10 RUN \ # Install the primary EPEL 10 repository - dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm && \ + dnf install -y --setopt=install_weak_deps=False \ + https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm && \ + \ + # Install the main list of packages (no full system update) + dnf install -y --setopt=install_weak_deps=False \ + diffutils git git-lfs iproute jq less lsof man nano procps \ + p7zip p7zip-plugins perl-Digest-SHA net-tools \ + openssh-clients openssl ripgrep rsync socat sudo \ + time vim wget zip && \ \ - # Install the main list of packages - dnf install -y diffutils git git-lfs iproute jq less lsof man nano procps p7zip p7zip-plugins \ - perl-Digest-SHA net-tools openssh-clients openssl ripgrep rsync socat sudo time vim wget zip && \ - # Final update and cleanup - dnf update -y && \ dnf clean all # install stow from EPEL 9 as it is not yet available in EPEL 10 @@ -47,8 +50,7 @@ RUN \ rm /etc/yum.repos.d/epel-9.repo ## podman buildah skopeo -RUN dnf -y reinstall shadow-utils && \ - dnf -y install podman buildah skopeo fuse-overlayfs && \ +RUN dnf -y install podman buildah skopeo fuse-overlayfs && \ dnf clean all # Download and install gh-cli depending on the architecture.