Skip to content

Commit 2e30230

Browse files
authored
NO-JIRA: fix(dockerfiles): allow skipping some packages if full dnf upgrade cannot be performed (opendatahub-io#2462)
This usually means there's a bug in RHEL ;( Happens from time to time.
1 parent a07673f commit 2e30230

File tree

23 files changed

+92
-23
lines changed

23 files changed

+92
-23
lines changed

codeserver/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ USER 0
7777
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
7878

7979
# upgrade first to avoid fixable vulnerabilities begin
80-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
80+
# Problem: The operation would result in removing the following protected packages: systemd
81+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
82+
# Solution: --best --skip-broken does not work either, so use --nobest
83+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
8184
&& dnf clean all -y
8285
# upgrade first to avoid fixable vulnerabilities end
8386

jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ ARG TARGETARCH
4747
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
4848

4949
# upgrade first to avoid fixable vulnerabilities begin
50-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
50+
# Problem: The operation would result in removing the following protected packages: systemd
51+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
52+
# Solution: --best --skip-broken does not work either, so use --nobest
53+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
5154
&& dnf clean all -y
5255
# upgrade first to avoid fixable vulnerabilities end
5356

jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ USER 0
1919
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
2020

2121
# upgrade first to avoid fixable vulnerabilities begin
22-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
22+
# Problem: The operation would result in removing the following protected packages: systemd
23+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
24+
# Solution: --best --skip-broken does not work either, so use --nobest
25+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
2326
&& dnf clean all -y
2427
# upgrade first to avoid fixable vulnerabilities end
2528

jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ USER 0
2121
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
2222

2323
# upgrade first to avoid fixable vulnerabilities begin
24-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
24+
# Problem: The operation would result in removing the following protected packages: systemd
25+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
26+
# Solution: --best --skip-broken does not work either, so use --nobest
27+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
2528
&& dnf clean all -y
2629
# upgrade first to avoid fixable vulnerabilities end
2730

jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ USER 0
1919
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
2020

2121
# upgrade first to avoid fixable vulnerabilities begin
22-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
22+
# Problem: The operation would result in removing the following protected packages: systemd
23+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
24+
# Solution: --best --skip-broken does not work either, so use --nobest
25+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
2326
&& dnf clean all -y
2427
# upgrade first to avoid fixable vulnerabilities end
2528

jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.cuda

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ USER 0
3434
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
3535

3636
# upgrade first to avoid fixable vulnerabilities begin
37-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
37+
# Problem: The operation would result in removing the following protected packages: systemd
38+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
39+
# Solution: --best --skip-broken does not work either, so use --nobest
40+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
3841
&& dnf clean all -y
3942
# upgrade first to avoid fixable vulnerabilities end
4043

jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ USER 0
3434
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
3535

3636
# upgrade first to avoid fixable vulnerabilities begin
37-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
37+
# Problem: The operation would result in removing the following protected packages: systemd
38+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
39+
# Solution: --best --skip-broken does not work either, so use --nobest
40+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
3841
&& dnf clean all -y
3942
# upgrade first to avoid fixable vulnerabilities end
4043

jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.rocm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ USER 0
3232
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
3333

3434
# upgrade first to avoid fixable vulnerabilities begin
35-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
35+
# Problem: The operation would result in removing the following protected packages: systemd
36+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
37+
# Solution: --best --skip-broken does not work either, so use --nobest
38+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
3639
&& dnf clean all -y
3740
# upgrade first to avoid fixable vulnerabilities end
3841

jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.rocm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ USER 0
3232
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
3333

3434
# upgrade first to avoid fixable vulnerabilities begin
35-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
35+
# Problem: The operation would result in removing the following protected packages: systemd
36+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
37+
# Solution: --best --skip-broken does not work either, so use --nobest
38+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
3639
&& dnf clean all -y
3740
# upgrade first to avoid fixable vulnerabilities end
3841

jupyter/tensorflow/ubi9-python-3.12/Dockerfile.cuda

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ USER 0
3434
COPY --from=registry.access.redhat.com/ubi9/ubi /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
3535

3636
# upgrade first to avoid fixable vulnerabilities begin
37-
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
37+
# Problem: The operation would result in removing the following protected packages: systemd
38+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
39+
# Solution: --best --skip-broken does not work either, so use --nobest
40+
RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
3841
&& dnf clean all -y
3942
# upgrade first to avoid fixable vulnerabilities end
4043

0 commit comments

Comments
 (0)