Skip to content

Commit ed0b8bf

Browse files
committed
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 <rohaan@redhat.com>
1 parent 4fbd385 commit ed0b8bf

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

base/ubi10/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@ RUN mkdir -p /home/tooling/
2727
## install packages from epel 10
2828
RUN \
2929
# Install the primary EPEL 10 repository
30-
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm && \
30+
dnf install -y --setopt=install_weak_deps=False \
31+
https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm && \
32+
\
33+
# Install the main list of packages (no full system update)
34+
dnf install -y --setopt=install_weak_deps=False \
35+
diffutils git git-lfs iproute jq less lsof man nano procps \
36+
p7zip p7zip-plugins perl-Digest-SHA net-tools \
37+
openssh-clients openssl ripgrep rsync socat sudo \
38+
time vim wget zip && \
3139
\
32-
# Install the main list of packages
33-
dnf install -y diffutils git git-lfs iproute jq less lsof man nano procps p7zip p7zip-plugins \
34-
perl-Digest-SHA net-tools openssh-clients openssl ripgrep rsync socat sudo time vim wget zip && \
35-
# Final update and cleanup
36-
dnf update -y && \
3740
dnf clean all
3841

3942
# install stow from EPEL 9 as it is not yet available in EPEL 10
@@ -47,8 +50,7 @@ RUN \
4750
rm /etc/yum.repos.d/epel-9.repo
4851

4952
## podman buildah skopeo
50-
RUN dnf -y reinstall shadow-utils && \
51-
dnf -y install podman buildah skopeo fuse-overlayfs && \
53+
RUN dnf -y install podman buildah skopeo fuse-overlayfs && \
5254
dnf clean all
5355

5456
# Download and install gh-cli depending on the architecture.

0 commit comments

Comments
 (0)