From 31a6c9da61fca20cf20c4b16ed1cfedea22a7d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 13:07:15 +0200 Subject: [PATCH 01/15] feat(Dockerfiles): switch from s2i python images to plain ubi/cs9 ones The main benefit is size and cve exposure, as the python images come with packages we don't use; python and pip is enough for us. Additionally, using plain ubi makes things more explicit. --- base/c9s-python-3.9/Dockerfile | 13 ++++++++++++- base/ubi9-python-3.11/Dockerfile | 15 +++++++++++++-- base/ubi9-python-3.9/Dockerfile | 13 ++++++++++++- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index ea94c6e73..fe6e2dac6 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -1,4 +1,15 @@ -FROM quay.io/sclorg/python-39-c9s:c9s +FROM quay.io/centos/centos:stream9 + +# perform the setup that python image used to do for us +# but this way it uses a lot less disk space (hundreds of megabytes less) +ENV VIRTUAL_ENV="/opt/app-root" +ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" +RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-root/src \ + --comment "Default Application User" --shell /bin/bash default && \ + dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* && \ + python3.9 -m venv "${VIRTUAL_ENV}" + +USER 1001 LABEL name="odh-notebook-base-centos-stream9-python-3.9" \ summary="Python 3.9 CentOS Stream 9 base image for ODH notebooks" \ diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 063b628ee..72eddd2cc 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -1,4 +1,15 @@ -FROM registry.access.redhat.com/ubi9/python-311:latest +FROM registry.access.redhat.com/ubi9/ubi:latest + +# perform the setup that python s2i image used to do for us +# but this way it uses a lot less disk space (hundreds of megabytes less) +ENV VIRTUAL_ENV="/opt/app-root" +ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" +RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-root/src \ + --comment "Default Application User" --shell /bin/bash default && \ + dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \ + python3.11 -m venv "${VIRTUAL_ENV}" + +USER 1001 LABEL name="odh-notebook-base-ubi9-python-3.11" \ summary="Python 3.11 base image for ODH notebooks" \ @@ -18,7 +29,7 @@ RUN pip install --no-cache-dir -U "micropipenv[toml]" # Install Python dependencies from Pipfile.lock file COPY Pipfile.lock ./ -RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock +RUN echo "Installing software and packages" && micropipenv install && rm -f ./Pipfile.lock # OS Packages needs to be installed as root USER root diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index 179061a41..d38fe3125 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -1,4 +1,15 @@ -FROM registry.access.redhat.com/ubi9/python-39:latest +FROM registry.access.redhat.com/ubi9/ubi:latest + +# perform the setup that python s2i image used to do for us +# but this way it uses a lot less disk space (hundreds of megabytes less) +ENV VIRTUAL_ENV="/opt/app-root" +ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" +RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-root/src \ + --comment "Default Application User" --shell /bin/bash default && \ + dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* && \ + python3.9 -m venv "${VIRTUAL_ENV}" + +USER 1001 LABEL name="odh-notebook-base-ubi9-python-3.9" \ summary="Python 3.9 base image for ODH notebooks" \ From 12a0cb2ba896687f80cd516c3d7ae0e8da779e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 13:12:30 +0200 Subject: [PATCH 02/15] fixup, setup venv running as 1001 --- base/c9s-python-3.9/Dockerfile | 4 ++-- base/ubi9-python-3.11/Dockerfile | 1 + base/ubi9-python-3.9/Dockerfile | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index fe6e2dac6..60844184f 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -6,10 +6,10 @@ ENV VIRTUAL_ENV="/opt/app-root" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-root/src \ --comment "Default Application User" --shell /bin/bash default && \ - dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* && \ - python3.9 -m venv "${VIRTUAL_ENV}" + dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* USER 1001 +RUN python3.9 -m venv "${VIRTUAL_ENV}" LABEL name="odh-notebook-base-centos-stream9-python-3.9" \ summary="Python 3.9 CentOS Stream 9 base image for ODH notebooks" \ diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 72eddd2cc..0bb15b3c1 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -10,6 +10,7 @@ RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-ro python3.11 -m venv "${VIRTUAL_ENV}" USER 1001 +RUN python3.8 -m venv "${VIRTUAL_ENV}" LABEL name="odh-notebook-base-ubi9-python-3.11" \ summary="Python 3.11 base image for ODH notebooks" \ diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index d38fe3125..093ecd641 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -6,10 +6,10 @@ ENV VIRTUAL_ENV="/opt/app-root" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-root/src \ --comment "Default Application User" --shell /bin/bash default && \ - dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* && \ - python3.9 -m venv "${VIRTUAL_ENV}" + dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* USER 1001 +python3.9 -m venv "${VIRTUAL_ENV}" LABEL name="odh-notebook-base-ubi9-python-3.9" \ summary="Python 3.9 base image for ODH notebooks" \ From 134fd7d1e392d4d11198fa8c8fd6b3967ecb3d55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 13:23:59 +0200 Subject: [PATCH 03/15] fixup, mkdir home directory first --- base/c9s-python-3.9/Dockerfile | 3 ++- base/ubi9-python-3.11/Dockerfile | 3 ++- base/ubi9-python-3.9/Dockerfile | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index 60844184f..a0f75f27f 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -4,7 +4,8 @@ FROM quay.io/centos/centos:stream9 # but this way it uses a lot less disk space (hundreds of megabytes less) ENV VIRTUAL_ENV="/opt/app-root" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" -RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-root/src \ +RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 ${VIRTUAL_ENV} && \ + useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 0bb15b3c1..2af332bbe 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -4,7 +4,8 @@ FROM registry.access.redhat.com/ubi9/ubi:latest # but this way it uses a lot less disk space (hundreds of megabytes less) ENV VIRTUAL_ENV="/opt/app-root" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" -RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-root/src \ +RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 ${VIRTUAL_ENV} && \ + useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \ python3.11 -m venv "${VIRTUAL_ENV}" diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index 093ecd641..0ab8d2172 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -4,12 +4,13 @@ FROM registry.access.redhat.com/ubi9/ubi:latest # but this way it uses a lot less disk space (hundreds of megabytes less) ENV VIRTUAL_ENV="/opt/app-root" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" -RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-root/src \ +RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 ${VIRTUAL_ENV} && \ + useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* USER 1001 -python3.9 -m venv "${VIRTUAL_ENV}" +RUN python3.9 -m venv "${VIRTUAL_ENV}" LABEL name="odh-notebook-base-ubi9-python-3.9" \ summary="Python 3.9 base image for ODH notebooks" \ From 6e38cfddeafd6eef0758d83d2249e1ad59e5a4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 13:35:09 +0200 Subject: [PATCH 04/15] fixup, fetch fix-permissions script --- base/c9s-python-3.9/Dockerfile | 1 + base/ubi9-python-3.11/Dockerfile | 4 ++-- base/ubi9-python-3.9/Dockerfile | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index a0f75f27f..78cc94fe7 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -8,6 +8,7 @@ RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* +COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions USER 1001 RUN python3.9 -m venv "${VIRTUAL_ENV}" diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 2af332bbe..907c65251 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -8,10 +8,10 @@ RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \ - python3.11 -m venv "${VIRTUAL_ENV}" +COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions USER 1001 -RUN python3.8 -m venv "${VIRTUAL_ENV}" +RUN python3.11 -m venv "${VIRTUAL_ENV}" LABEL name="odh-notebook-base-ubi9-python-3.11" \ summary="Python 3.11 base image for ODH notebooks" \ diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index 0ab8d2172..338b4113b 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -8,6 +8,7 @@ RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* +COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions USER 1001 RUN python3.9 -m venv "${VIRTUAL_ENV}" From 36face2383a7481444fc6c0be2c887ba250a0943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 13:46:53 +0200 Subject: [PATCH 05/15] fixup, set APP_ROOT env variable --- base/c9s-python-3.9/Dockerfile | 7 ++++--- base/ubi9-python-3.11/Dockerfile | 7 ++++--- base/ubi9-python-3.9/Dockerfile | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index 78cc94fe7..008bb2a0c 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -2,10 +2,11 @@ FROM quay.io/centos/centos:stream9 # perform the setup that python image used to do for us # but this way it uses a lot less disk space (hundreds of megabytes less) -ENV VIRTUAL_ENV="/opt/app-root" +ENV APP_ROOT="/opt/app-root" +ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" -RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 ${VIRTUAL_ENV} && \ - useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \ +RUN mkdir --parents --mode 0771 "${APP_ROOT}/src" && chown --recursive 1001:0 ${APP_ROOT} && \ + useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 907c65251..4b00c28cb 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -2,10 +2,11 @@ FROM registry.access.redhat.com/ubi9/ubi:latest # perform the setup that python s2i image used to do for us # but this way it uses a lot less disk space (hundreds of megabytes less) -ENV VIRTUAL_ENV="/opt/app-root" +ENV APP_ROOT="/opt/app-root" +ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" -RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 ${VIRTUAL_ENV} && \ - useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \ +RUN mkdir --parents --mode 0771 "${APP_ROOT}/src" && chown --recursive 1001:0 ${APP_ROOT} && \ + useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \ COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index 338b4113b..706edde2c 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -2,10 +2,11 @@ FROM registry.access.redhat.com/ubi9/ubi:latest # perform the setup that python s2i image used to do for us # but this way it uses a lot less disk space (hundreds of megabytes less) -ENV VIRTUAL_ENV="/opt/app-root" +ENV APP_ROOT="/opt/app-root" +ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" -RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 ${VIRTUAL_ENV} && \ - useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \ +RUN mkdir --parents --mode 0771 "${APP_ROOT}/src" && chown --recursive 1001:0 ${APP_ROOT} && \ + useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions From 269c78fe5cb35bc516568274346c665f5239c9b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 13:48:43 +0200 Subject: [PATCH 06/15] fixup, install wget in c9s --- base/c9s-python-3.9/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index 008bb2a0c..38b5aec39 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -36,7 +36,10 @@ COPY Pipfile.lock ./ USER root # Install usefull OS packages -RUN dnf install -y mesa-libGL && dnf clean all && rm -rf /var/cache/yum +RUN dnf install -y \ + mesa-libGL \ + wget \ + && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 From 3b01837703b8e0531086a9199536d64ace47be51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 13:59:05 +0200 Subject: [PATCH 07/15] fixup, set more s2i env variables --- base/c9s-python-3.9/Dockerfile | 6 ++++-- base/ubi9-python-3.11/Dockerfile | 8 +++++--- base/ubi9-python-3.9/Dockerfile | 6 ++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index 38b5aec39..0c86a2986 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -5,14 +5,16 @@ FROM quay.io/centos/centos:stream9 ENV APP_ROOT="/opt/app-root" ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" -RUN mkdir --parents --mode 0771 "${APP_ROOT}/src" && chown --recursive 1001:0 ${APP_ROOT} && \ +ENV PYTHON_VERSION=3.9 +ENV PIP_NO_CACHE_DIR=off +RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions USER 1001 -RUN python3.9 -m venv "${VIRTUAL_ENV}" +RUN python${PYTHON_VERSION} -m venv "${VIRTUAL_ENV}" LABEL name="odh-notebook-base-centos-stream9-python-3.9" \ summary="Python 3.9 CentOS Stream 9 base image for ODH notebooks" \ diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 4b00c28cb..cd8ca83be 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -5,14 +5,16 @@ FROM registry.access.redhat.com/ubi9/ubi:latest ENV APP_ROOT="/opt/app-root" ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" -RUN mkdir --parents --mode 0771 "${APP_ROOT}/src" && chown --recursive 1001:0 ${APP_ROOT} && \ +ENV PYTHON_VERSION=3.11 +ENV PIP_NO_CACHE_DIR=off +RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \ COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions USER 1001 -RUN python3.11 -m venv "${VIRTUAL_ENV}" +RUN python${PYTHON_VERSION} -m venv "${VIRTUAL_ENV}" LABEL name="odh-notebook-base-ubi9-python-3.11" \ summary="Python 3.11 base image for ODH notebooks" \ @@ -50,7 +52,7 @@ RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/oc rm -f /tmp/openshift-client-linux.tar.gz # Fix permissions to support pip in Openshift environments -RUN chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ +RUN chmod -R g+w /opt/app-root/lib/python${PYTHON_VERSION}/site-packages && \ fix-permissions /opt/app-root -P WORKDIR /opt/app-root/src diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index 706edde2c..637ea03ea 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -5,14 +5,16 @@ FROM registry.access.redhat.com/ubi9/ubi:latest ENV APP_ROOT="/opt/app-root" ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" -RUN mkdir --parents --mode 0771 "${APP_ROOT}/src" && chown --recursive 1001:0 ${APP_ROOT} && \ +ENV PYTHON_VERSION=3.9 +ENV PIP_NO_CACHE_DIR=off +RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions USER 1001 -RUN python3.9 -m venv "${VIRTUAL_ENV}" +RUN python${PYTHON_VERSION} -m venv "${VIRTUAL_ENV}" LABEL name="odh-notebook-base-ubi9-python-3.9" \ summary="Python 3.9 base image for ODH notebooks" \ From 09fe7156e93493b7d89414aea06fd313e0c1339e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 15:18:09 +0200 Subject: [PATCH 08/15] fixup, copy in /usr/bin/rpm-file-permissions from s2i --- base/c9s-python-3.9/Dockerfile | 2 +- base/ubi9-python-3.11/Dockerfile | 2 +- base/ubi9-python-3.9/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index 0c86a2986..4570e9984 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -11,7 +11,7 @@ RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && c useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* -COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions +COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/ USER 1001 RUN python${PYTHON_VERSION} -m venv "${VIRTUAL_ENV}" diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index cd8ca83be..0a5bb04f7 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -11,7 +11,7 @@ RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && c useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \ -COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions +COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/ USER 1001 RUN python${PYTHON_VERSION} -m venv "${VIRTUAL_ENV}" diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index 637ea03ea..d20fb3d94 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -11,7 +11,7 @@ RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && c useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* -COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions +COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/ USER 1001 RUN python${PYTHON_VERSION} -m venv "${VIRTUAL_ENV}" From 8d06605a33b76bb0bad4ee08de76c39702a56dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 15:30:59 +0200 Subject: [PATCH 09/15] fixup, vscode extensions get installed into HOME --- base/c9s-python-3.9/Dockerfile | 1 + base/ubi9-python-3.11/Dockerfile | 1 + base/ubi9-python-3.9/Dockerfile | 1 + 3 files changed, 3 insertions(+) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index 4570e9984..76b7fad5f 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -3,6 +3,7 @@ FROM quay.io/centos/centos:stream9 # perform the setup that python image used to do for us # but this way it uses a lot less disk space (hundreds of megabytes less) ENV APP_ROOT="/opt/app-root" +ENV HOME="${APP_ROOT}" ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" ENV PYTHON_VERSION=3.9 diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 0a5bb04f7..6bcd9a800 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -3,6 +3,7 @@ FROM registry.access.redhat.com/ubi9/ubi:latest # perform the setup that python s2i image used to do for us # but this way it uses a lot less disk space (hundreds of megabytes less) ENV APP_ROOT="/opt/app-root" +ENV HOME="${APP_ROOT}" ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" ENV PYTHON_VERSION=3.11 diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index d20fb3d94..84f284648 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -3,6 +3,7 @@ FROM registry.access.redhat.com/ubi9/ubi:latest # perform the setup that python s2i image used to do for us # but this way it uses a lot less disk space (hundreds of megabytes less) ENV APP_ROOT="/opt/app-root" +ENV HOME="${APP_ROOT}" ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" ENV PYTHON_VERSION=3.9 From ffb791cafb0c29ae728adb460b6bbc35aaa5cfe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 15:38:27 +0200 Subject: [PATCH 10/15] fixup, set the HOME env variable correctly this time --- base/c9s-python-3.9/Dockerfile | 6 +++--- base/ubi9-python-3.11/Dockerfile | 6 +++--- base/ubi9-python-3.9/Dockerfile | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index 76b7fad5f..625c48ffc 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -3,13 +3,13 @@ FROM quay.io/centos/centos:stream9 # perform the setup that python image used to do for us # but this way it uses a lot less disk space (hundreds of megabytes less) ENV APP_ROOT="/opt/app-root" -ENV HOME="${APP_ROOT}" +ENV HOME="${APP_ROOT}/src" ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" ENV PYTHON_VERSION=3.9 ENV PIP_NO_CACHE_DIR=off -RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ - useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ +RUN mkdir --parents "${HOME}" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ + useradd --uid 1001 --gid 0 --no-create-home --home-dir "${HOME}" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/ diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 6bcd9a800..141d0d208 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -3,13 +3,13 @@ FROM registry.access.redhat.com/ubi9/ubi:latest # perform the setup that python s2i image used to do for us # but this way it uses a lot less disk space (hundreds of megabytes less) ENV APP_ROOT="/opt/app-root" -ENV HOME="${APP_ROOT}" +ENV HOME="${APP_ROOT}/src" ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" ENV PYTHON_VERSION=3.11 ENV PIP_NO_CACHE_DIR=off -RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ - useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ +RUN mkdir --parents "${HOME}" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ + useradd --uid 1001 --gid 0 --no-create-home --home-dir "${HOME}" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \ COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/ diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index 84f284648..f0d0a220c 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -3,13 +3,13 @@ FROM registry.access.redhat.com/ubi9/ubi:latest # perform the setup that python s2i image used to do for us # but this way it uses a lot less disk space (hundreds of megabytes less) ENV APP_ROOT="/opt/app-root" -ENV HOME="${APP_ROOT}" +ENV HOME="${APP_ROOT}/src" ENV VIRTUAL_ENV="${APP_ROOT}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" ENV PYTHON_VERSION=3.9 ENV PIP_NO_CACHE_DIR=off -RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ - useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \ +RUN mkdir --parents "${HOME}" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ + useradd --uid 1001 --gid 0 --no-create-home --home-dir "${HOME}" \ --comment "Default Application User" --shell /bin/bash default && \ dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/* COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/ From 8b2e727d5dc9cbdce3238b9b24e38765d9167be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 24 Jul 2024 15:51:01 +0200 Subject: [PATCH 11/15] fixup, install patch for tensorflow image --- base/c9s-python-3.9/Dockerfile | 1 + base/ubi9-python-3.9/Dockerfile | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index 625c48ffc..f3ed220aa 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -41,6 +41,7 @@ USER root # Install usefull OS packages RUN dnf install -y \ mesa-libGL \ + patch \ wget \ && dnf clean all && rm -rf /var/cache/yum diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index f0d0a220c..938fd8c5b 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -41,7 +41,11 @@ RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./P USER root # Install usefull OS packages -RUN dnf install -y mesa-libGL && dnf clean all && rm -rf /var/cache/yum +RUN dnf install -y \ + mesa-libGL \ + patch \ + wget \ + && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 From aa02b118fa6936e51893163dcc637a35445643c6 Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Fri, 4 Oct 2024 09:31:52 +0200 Subject: [PATCH 12/15] fixups for python 3.11 when it got added --- base/c9s-python-3.11/Dockerfile | 19 ++++++++++++++++++- base/c9s-python-3.9/Dockerfile | 2 +- base/ubi9-python-3.11/Dockerfile | 2 +- base/ubi9-python-3.9/Dockerfile | 4 ++-- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/base/c9s-python-3.11/Dockerfile b/base/c9s-python-3.11/Dockerfile index f0f0d570c..bc21d89a1 100644 --- a/base/c9s-python-3.11/Dockerfile +++ b/base/c9s-python-3.11/Dockerfile @@ -1,4 +1,21 @@ -FROM quay.io/sclorg/python-311-c9s:c9s +FROM quay.io/centos/centos:stream9 + +# perform the setup that python image used to do for us +# but this way it uses a lot less disk space (hundreds of megabytes less) +ENV APP_ROOT="/opt/app-root" +ENV HOME="${APP_ROOT}/src" +ENV VIRTUAL_ENV="${APP_ROOT}" +ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" +ENV PYTHON_VERSION=3.11 +ENV PIP_NO_CACHE_DIR=off +RUN mkdir --parents "${HOME}" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ + useradd --uid 1001 --gid 0 --no-create-home --home-dir "${HOME}" \ + --comment "Default Application User" --shell /bin/bash default && \ + dnf install -y python${PYTHON_VERSION}-pip && dnf clean all && rm -rf /var/cache/yum/* +COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/ + +USER 1001 +RUN python${PYTHON_VERSION} -m venv "${VIRTUAL_ENV}" LABEL name="odh-notebook-base-centos-stream9-python-3.11" \ summary="Python 3.11 CentOS Stream 9 base image for ODH notebooks" \ diff --git a/base/c9s-python-3.9/Dockerfile b/base/c9s-python-3.9/Dockerfile index f3ed220aa..7128e8f59 100644 --- a/base/c9s-python-3.9/Dockerfile +++ b/base/c9s-python-3.9/Dockerfile @@ -55,7 +55,7 @@ RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./P tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \ rm -f /tmp/openshift-client-linux.tar.gz && \ # Fix permissions to support pip in Openshift environments \ - chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \ + chmod -R g+w /opt/app-root/lib/python${PYTHON_VERSION}/site-packages && \ fix-permissions /opt/app-root -P WORKDIR /opt/app-root/src diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 141d0d208..99f22daad 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -11,7 +11,7 @@ ENV PIP_NO_CACHE_DIR=off RUN mkdir --parents "${HOME}" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ useradd --uid 1001 --gid 0 --no-create-home --home-dir "${HOME}" \ --comment "Default Application User" --shell /bin/bash default && \ - dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \ + dnf install -y python${PYTHON_VERSION}-pip && dnf clean all && rm -rf /var/cache/yum/* && \ COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/ USER 1001 diff --git a/base/ubi9-python-3.9/Dockerfile b/base/ubi9-python-3.9/Dockerfile index 938fd8c5b..a1dcdc757 100644 --- a/base/ubi9-python-3.9/Dockerfile +++ b/base/ubi9-python-3.9/Dockerfile @@ -35,7 +35,7 @@ RUN pip install --no-cache-dir -U "micropipenv[toml]" # Install Python dependencies from Pipfile.lock file COPY Pipfile.lock ./ -RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock +RUN echo "Installing software and packages" && micropipenv install && rm -f ./Pipfile.lock # OS Packages needs to be installed as root USER root @@ -57,7 +57,7 @@ RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/oc rm -f /tmp/openshift-client-linux.tar.gz # Fix permissions to support pip in Openshift environments -RUN chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \ +RUN chmod -R g+w /opt/app-root/lib/python${PYTHON_VERSION}/site-packages && \ fix-permissions /opt/app-root -P WORKDIR /opt/app-root/src From d84a4426f5d9e37987ae1d4f8b95d31ac05b1214 Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Fri, 4 Oct 2024 09:48:31 +0200 Subject: [PATCH 13/15] fixup extra slash --- base/ubi9-python-3.11/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 99f22daad..6a9386d04 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -11,7 +11,7 @@ ENV PIP_NO_CACHE_DIR=off RUN mkdir --parents "${HOME}" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \ useradd --uid 1001 --gid 0 --no-create-home --home-dir "${HOME}" \ --comment "Default Application User" --shell /bin/bash default && \ - dnf install -y python${PYTHON_VERSION}-pip && dnf clean all && rm -rf /var/cache/yum/* && \ + dnf install -y python${PYTHON_VERSION}-pip && dnf clean all && rm -rf /var/cache/yum/* COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/ USER 1001 From 2ca70db7595c09810899f767843ed86b940caadd Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Fri, 4 Oct 2024 09:58:32 +0200 Subject: [PATCH 14/15] fixup install extra packages on c9s py.11 (that we already have on py3.9) --- base/c9s-python-3.11/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/c9s-python-3.11/Dockerfile b/base/c9s-python-3.11/Dockerfile index bc21d89a1..f2ededd28 100644 --- a/base/c9s-python-3.11/Dockerfile +++ b/base/c9s-python-3.11/Dockerfile @@ -39,7 +39,11 @@ COPY Pipfile.lock ./ USER root # Install usefull OS packages -RUN dnf install -y mesa-libGL && dnf clean all && rm -rf /var/cache/yum +RUN dnf install -y \ + mesa-libGL \ + patch \ + wget \ + && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 From 41741e44b972bba061e70a67638596b9656322ec Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Fri, 4 Oct 2024 09:59:10 +0200 Subject: [PATCH 15/15] fixup install extra packages on ubi9 py.11 (that we already have on py3.9) --- base/ubi9-python-3.11/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/ubi9-python-3.11/Dockerfile b/base/ubi9-python-3.11/Dockerfile index 6a9386d04..a7002632b 100644 --- a/base/ubi9-python-3.11/Dockerfile +++ b/base/ubi9-python-3.11/Dockerfile @@ -41,7 +41,11 @@ RUN echo "Installing software and packages" && micropipenv install && rm -f ./Pi USER root # Install usefull OS packages -RUN dnf install -y mesa-libGL && dnf clean all && rm -rf /var/cache/yum +RUN dnf install -y \ + mesa-libGL \ + patch \ + wget \ + && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001