Skip to content

Commit b8c9dad

Browse files
committed
RHAIENG-1965: chore(cli): update Dockerfile.konflux* comments for consistency with scripts/dockerfile_fragments.py
* opendatahub-io#2682
1 parent 3d1833c commit b8c9dad

File tree

42 files changed

+752
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+752
-136
lines changed

codeserver/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,3 +335,30 @@ EOF
335335

336336
FROM codeserver
337337
COPY --from=tests /tmp/test_log.txt /tmp/test_log.txt
338+
339+
### BEGIN upgrade first to avoid fixable vulnerabilities
340+
# Problem: The operation would result in removing the following protected packages: systemd
341+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
342+
# Solution: --best --skip-broken does not work either, so use --nobest
343+
RUN /bin/bash <<'EOF'
344+
set -Eeuxo pipefail
345+
dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0
346+
dnf clean all -y
347+
EOF
348+
349+
### END upgrade first to avoid fixable vulnerabilities
350+
351+
### BEGIN Install micropipenv and uv to deploy packages from requirements.txt
352+
RUN pip install --no-cache-dir --extra-index-url https://pypi.org/simple -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
353+
### END Install micropipenv and uv to deploy packages from requirements.txt
354+
355+
### BEGIN Install the oc client
356+
RUN /bin/bash <<'EOF'
357+
set -Eeuxo pipefail
358+
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
359+
-o /tmp/openshift-client-linux.tar.gz
360+
tar -xzvf /tmp/openshift-client-linux.tar.gz oc
361+
rm -f /tmp/openshift-client-linux.tar.gz
362+
EOF
363+
364+
### END Install the oc client

codeserver/ubi9-python-3.12/Dockerfile.konflux.cpu

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ USER 0
8585
# By copying ubi.repo from the public UBI 9 image, we enable package management for upgrades and installations.
8686
COPY --from=ubi-repos /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
8787

88-
# upgrade first to avoid fixable vulnerabilities begin
88+
### BEGIN upgrade first to avoid fixable vulnerabilities
8989
# Problem: The operation would result in removing the following protected packages: systemd
9090
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
9191
# Solution: --best --skip-broken does not work either, so use --nobest
@@ -95,7 +95,7 @@ dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=in
9595
dnf clean all -y
9696
EOF
9797

98-
# upgrade first to avoid fixable vulnerabilities end
98+
### END upgrade first to avoid fixable vulnerabilities
9999

100100
# Install useful OS packages
101101
RUN /bin/bash <<'EOF'
@@ -116,11 +116,11 @@ EOF
116116
# Other apps and tools installed as default user
117117
USER 1001
118118

119-
# Install micropipenv and uv to deploy packages from requirements.txt begin
119+
### BEGIN Install micropipenv and uv to deploy packages from requirements.txt
120120
RUN pip install --no-cache-dir --extra-index-url https://pypi.org/simple -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
121-
# Install micropipenv and uv to deploy packages from requirements.txt end
121+
### END Install micropipenv and uv to deploy packages from requirements.txt
122122

123-
# Install the oc client begin
123+
### BEGIN Install the oc client
124124
RUN /bin/bash <<'EOF'
125125
set -Eeuxo pipefail
126126
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -129,7 +129,7 @@ tar -xzvf /tmp/openshift-client-linux.tar.gz oc
129129
rm -f /tmp/openshift-client-linux.tar.gz
130130
EOF
131131

132-
# Install the oc client end
132+
### END Install the oc client
133133

134134
####################
135135
# codeserver #

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,3 +455,36 @@ fix-permissions /opt/app-root -P
455455
EOF
456456

457457
WORKDIR /opt/app-root/src
458+
459+
### BEGIN upgrade first to avoid fixable vulnerabilities
460+
# Problem: The operation would result in removing the following protected packages: systemd
461+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
462+
# Solution: --best --skip-broken does not work either, so use --nobest
463+
RUN /bin/bash <<'EOF'
464+
set -Eeuxo pipefail
465+
dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0
466+
dnf clean all -y
467+
EOF
468+
469+
### END upgrade first to avoid fixable vulnerabilities
470+
471+
### BEGIN Install micropipenv and uv to deploy packages from requirements.txt
472+
RUN pip install --no-cache-dir --extra-index-url https://pypi.org/simple -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
473+
### END Install micropipenv and uv to deploy packages from requirements.txt
474+
475+
### BEGIN Install the oc client
476+
RUN /bin/bash <<'EOF'
477+
set -Eeuxo pipefail
478+
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
479+
-o /tmp/openshift-client-linux.tar.gz
480+
tar -xzvf /tmp/openshift-client-linux.tar.gz oc
481+
rm -f /tmp/openshift-client-linux.tar.gz
482+
EOF
483+
484+
### END Install the oc client
485+
486+
### BEGIN Dependencies for PDF export
487+
RUN ./utils/install_pdf_deps.sh
488+
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
489+
490+
### END Dependencies for PDF export

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ARG TARGETARCH
5454
# By copying ubi.repo from the public UBI 9 image, we enable package management for upgrades and installations.
5555
COPY --from=ubi-repos /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
5656

57-
# upgrade first to avoid fixable vulnerabilities begin
57+
### BEGIN upgrade first to avoid fixable vulnerabilities
5858
# Problem: The operation would result in removing the following protected packages: systemd
5959
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
6060
# Solution: --best --skip-broken does not work either, so use --nobest
@@ -64,7 +64,7 @@ dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=in
6464
dnf clean all -y
6565
EOF
6666

67-
# upgrade first to avoid fixable vulnerabilities end
67+
### END upgrade first to avoid fixable vulnerabilities
6868

6969
# Install useful OS packages
7070
RUN --mount=type=cache,target=/var/cache/dnf /bin/bash <<'EOF'
@@ -114,11 +114,11 @@ EOF
114114
# Other apps and tools installed as default user
115115
USER 1001
116116

117-
# Install micropipenv and uv to deploy packages from requirements.txt begin
117+
### BEGIN Install micropipenv and uv to deploy packages from requirements.txt
118118
RUN pip install --no-cache-dir --extra-index-url https://pypi.org/simple -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
119-
# Install micropipenv and uv to deploy packages from requirements.txt end
119+
### END Install micropipenv and uv to deploy packages from requirements.txt
120120

121-
# Install the oc client begin
121+
### BEGIN Install the oc client
122122
RUN /bin/bash <<'EOF'
123123
set -Eeuxo pipefail
124124
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -127,7 +127,7 @@ tar -xzvf /tmp/openshift-client-linux.tar.gz oc
127127
rm -f /tmp/openshift-client-linux.tar.gz
128128
EOF
129129

130-
# Install the oc client end
130+
### END Install the oc client
131131

132132
##############################
133133
# wheel-builder stage #
@@ -280,11 +280,11 @@ COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
280280

281281
USER 0
282282

283-
# Dependencies for PDF export begin
283+
### BEGIN Dependencies for PDF export
284284
RUN ./utils/install_pdf_deps.sh
285285
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
286286

287-
# Dependencies for PDF export end
287+
### END Dependencies for PDF export
288288

289289
USER 1001
290290

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

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
101101

102102
USER 0
103103

104-
# Dependencies for PDF export begin
104+
# Dependencies for PDF export
105105
RUN --mount=type=cache,from=pdf-builder,source=/usr/local/,target=/pdf_builder/,rw \
106106
bash -c ' \
107107
if [[ "$(uname -m)" == "ppc64le" ]]; then \
@@ -138,3 +138,36 @@ EOF
138138
WORKDIR /opt/app-root/src
139139

140140
ENTRYPOINT ["start-notebook.sh"]
141+
142+
### BEGIN upgrade first to avoid fixable vulnerabilities
143+
# Problem: The operation would result in removing the following protected packages: systemd
144+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
145+
# Solution: --best --skip-broken does not work either, so use --nobest
146+
RUN /bin/bash <<'EOF'
147+
set -Eeuxo pipefail
148+
dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0
149+
dnf clean all -y
150+
EOF
151+
152+
### END upgrade first to avoid fixable vulnerabilities
153+
154+
### BEGIN Install micropipenv and uv to deploy packages from requirements.txt
155+
RUN pip install --no-cache-dir --extra-index-url https://pypi.org/simple -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
156+
### END Install micropipenv and uv to deploy packages from requirements.txt
157+
158+
### BEGIN Install the oc client
159+
RUN /bin/bash <<'EOF'
160+
set -Eeuxo pipefail
161+
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
162+
-o /tmp/openshift-client-linux.tar.gz
163+
tar -xzvf /tmp/openshift-client-linux.tar.gz oc
164+
rm -f /tmp/openshift-client-linux.tar.gz
165+
EOF
166+
167+
### END Install the oc client
168+
169+
### BEGIN Dependencies for PDF export
170+
RUN ./utils/install_pdf_deps.sh
171+
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
172+
173+
### END Dependencies for PDF export

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,36 @@ EOF
118118
WORKDIR /opt/app-root/src
119119

120120
ENTRYPOINT ["start-notebook.sh"]
121+
122+
### BEGIN upgrade first to avoid fixable vulnerabilities
123+
# Problem: The operation would result in removing the following protected packages: systemd
124+
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
125+
# Solution: --best --skip-broken does not work either, so use --nobest
126+
RUN /bin/bash <<'EOF'
127+
set -Eeuxo pipefail
128+
dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0
129+
dnf clean all -y
130+
EOF
131+
132+
### END upgrade first to avoid fixable vulnerabilities
133+
134+
### BEGIN Install micropipenv and uv to deploy packages from requirements.txt
135+
RUN pip install --no-cache-dir --extra-index-url https://pypi.org/simple -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
136+
### END Install micropipenv and uv to deploy packages from requirements.txt
137+
138+
### BEGIN Install the oc client
139+
RUN /bin/bash <<'EOF'
140+
set -Eeuxo pipefail
141+
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
142+
-o /tmp/openshift-client-linux.tar.gz
143+
tar -xzvf /tmp/openshift-client-linux.tar.gz oc
144+
rm -f /tmp/openshift-client-linux.tar.gz
145+
EOF
146+
147+
### END Install the oc client
148+
149+
### BEGIN Dependencies for PDF export
150+
RUN ./utils/install_pdf_deps.sh
151+
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
152+
153+
### END Dependencies for PDF export

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

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ USER 0
4141
# By copying ubi.repo from the public UBI 9 image, we enable package management for upgrades and installations.
4242
COPY --from=ubi-repos /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
4343

44-
# upgrade first to avoid fixable vulnerabilities begin
44+
### BEGIN upgrade first to avoid fixable vulnerabilities
4545
# Problem: The operation would result in removing the following protected packages: systemd
4646
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
4747
# Solution: --best --skip-broken does not work either, so use --nobest
@@ -51,7 +51,7 @@ dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=in
5151
dnf clean all -y
5252
EOF
5353

54-
# upgrade first to avoid fixable vulnerabilities end
54+
### END upgrade first to avoid fixable vulnerabilities
5555

5656
# Install useful OS packages
5757
RUN /bin/bash <<'EOF'
@@ -64,11 +64,11 @@ EOF
6464
# Other apps and tools installed as default user
6565
USER 1001
6666

67-
# Install micropipenv and uv to deploy packages from requirements.txt begin
67+
### BEGIN Install micropipenv and uv to deploy packages from requirements.txt
6868
RUN pip install --no-cache-dir --extra-index-url https://pypi.org/simple -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
69-
# Install micropipenv and uv to deploy packages from requirements.txt end
69+
### END Install micropipenv and uv to deploy packages from requirements.txt
7070

71-
# Install the oc client begin
71+
### BEGIN Install the oc client
7272
RUN /bin/bash <<'EOF'
7373
set -Eeuxo pipefail
7474
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -77,7 +77,7 @@ tar -xzvf /tmp/openshift-client-linux.tar.gz oc
7777
rm -f /tmp/openshift-client-linux.tar.gz
7878
EOF
7979

80-
# Install the oc client end
80+
### END Install the oc client
8181

8282
####################
8383
# jupyter-minimal #
@@ -93,7 +93,7 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
9393

9494
USER 0
9595

96-
# Dependencies for PDF export begin
96+
# Dependencies for PDF export
9797
RUN --mount=type=cache,from=pdf-builder,source=/usr/local/,target=/pdf_builder/,rw \
9898
bash -c ' \
9999
if [[ "$(uname -m)" == "ppc64le" ]]; then \
@@ -138,3 +138,9 @@ LABEL name="rhoai/odh-workbench-jupyter-minimal-cpu-py312-rhel9" \
138138
description="Minimal Jupyter CPU notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
139139
io.k8s.description="Minimal Jupyter CPU notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
140140
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
141+
142+
### BEGIN Dependencies for PDF export
143+
RUN ./utils/install_pdf_deps.sh
144+
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
145+
146+
### END Dependencies for PDF export

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ USER 0
2525
# By copying ubi.repo from the public UBI 9 image, we enable package management for upgrades and installations.
2626
COPY --from=ubi-repos /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
2727

28-
# upgrade first to avoid fixable vulnerabilities begin
28+
### BEGIN upgrade first to avoid fixable vulnerabilities
2929
# Problem: The operation would result in removing the following protected packages: systemd
3030
# (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
3131
# Solution: --best --skip-broken does not work either, so use --nobest
@@ -35,7 +35,7 @@ dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=in
3535
dnf clean all -y
3636
EOF
3737

38-
# upgrade first to avoid fixable vulnerabilities end
38+
### END upgrade first to avoid fixable vulnerabilities
3939

4040
# Install useful OS packages
4141
RUN /bin/bash <<'EOF'
@@ -48,11 +48,11 @@ EOF
4848
# Other apps and tools installed as default user
4949
USER 1001
5050

51-
# Install micropipenv and uv to deploy packages from requirements.txt begin
51+
### BEGIN Install micropipenv and uv to deploy packages from requirements.txt
5252
RUN pip install --no-cache-dir --extra-index-url https://pypi.org/simple -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
53-
# Install micropipenv and uv to deploy packages from requirements.txt end
53+
### END Install micropipenv and uv to deploy packages from requirements.txt
5454

55-
# Install the oc client begin
55+
### BEGIN Install the oc client
5656
RUN /bin/bash <<'EOF'
5757
set -Eeuxo pipefail
5858
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -61,7 +61,7 @@ tar -xzvf /tmp/openshift-client-linux.tar.gz oc
6161
rm -f /tmp/openshift-client-linux.tar.gz
6262
EOF
6363

64-
# Install the oc client end
64+
### END Install the oc client
6565

6666
#########################
6767
# cuda-jupyter-minimal #
@@ -87,11 +87,11 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
8787

8888
USER 0
8989

90-
# Dependencies for PDF export begin
90+
### BEGIN Dependencies for PDF export
9191
RUN ./utils/install_pdf_deps.sh
9292
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
9393

94-
# Dependencies for PDF export end
94+
### END Dependencies for PDF export
9595

9696
USER 1001
9797

0 commit comments

Comments
 (0)