diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 7cdbfca4..7ff655ec 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -70,22 +70,6 @@ jobs: tag: "c10s" image_name: "python-312-c10s" - - dockerfile: "3.13/Dockerfile.fedora" - docker_context: "3.13" - registry_namespace: "fedora" - quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" - quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" - tag: "313" - image_name: "python-313" - - - dockerfile: "3.13-minimal/Dockerfile.fedora" - docker_context: "3.13-minimal" - registry_namespace: "fedora" - quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" - quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" - tag: "313" - image_name: "python-313-minimal" - - dockerfile: "3.13/Dockerfile.c10s" docker_context: "3.13" registry_namespace: "sclorg" diff --git a/.github/workflows/container-tests.yml b/.github/workflows/container-tests.yml index 67904ab7..8d893550 100644 --- a/.github/workflows/container-tests.yml +++ b/.github/workflows/container-tests.yml @@ -14,6 +14,6 @@ jobs: uses: "sclorg/ci-actions/.github/workflows/container-tests.yml@main" with: enabled-tests: '["container","container-pytest","openshift-pytest"]' - versions: '[ "3.9", "3.9-minimal", "3.12", "3.12-minimal", "3.13", "3.13-minimal", "3.14", "3.14-minimal" ]' + versions: '[ "3.6", "3.9", "3.9-minimal", "3.12", "3.12-minimal", "3.13", "3.13-minimal", "3.14", "3.14-minimal" ]' openshift-versions: '[ "3.8", "3.9", "3.12", "3.12-minimal" ]' secrets: inherit diff --git a/3.12-minimal/Dockerfile.c10s b/3.12-minimal/Dockerfile.c10s index d66575c8..5880d7ec 100644 --- a/3.12-minimal/Dockerfile.c10s +++ b/3.12-minimal/Dockerfile.c10s @@ -65,13 +65,6 @@ COPY 3.12-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.12-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.12-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.12 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.12-minimal/Dockerfile.c9s b/3.12-minimal/Dockerfile.c9s index bb4cd2ae..b86f05ce 100644 --- a/3.12-minimal/Dockerfile.c9s +++ b/3.12-minimal/Dockerfile.c9s @@ -65,13 +65,6 @@ COPY 3.12-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.12-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.12-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.12 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.12-minimal/Dockerfile.rhel10 b/3.12-minimal/Dockerfile.rhel10 index d133a9d4..ec38f83f 100644 --- a/3.12-minimal/Dockerfile.rhel10 +++ b/3.12-minimal/Dockerfile.rhel10 @@ -65,13 +65,6 @@ COPY 3.12-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.12-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.12-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.12 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.12-minimal/Dockerfile.rhel8 b/3.12-minimal/Dockerfile.rhel8 index 521afbb9..845c9d82 100644 --- a/3.12-minimal/Dockerfile.rhel8 +++ b/3.12-minimal/Dockerfile.rhel8 @@ -65,13 +65,6 @@ COPY 3.12-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.12-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.12-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.12 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.12-minimal/Dockerfile.rhel9 b/3.12-minimal/Dockerfile.rhel9 index 86b7165f..0aa9e248 100644 --- a/3.12-minimal/Dockerfile.rhel9 +++ b/3.12-minimal/Dockerfile.rhel9 @@ -65,13 +65,6 @@ COPY 3.12-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.12-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.12-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.12 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.12-minimal/root/opt/wheels b/3.12-minimal/root/opt/wheels deleted file mode 120000 index 4eabc067..00000000 --- a/3.12-minimal/root/opt/wheels +++ /dev/null @@ -1 +0,0 @@ -../../../src/root/opt/wheels/ \ No newline at end of file diff --git a/3.12-minimal/s2i/bin/assemble b/3.12-minimal/s2i/bin/assemble index 34a68dbb..c498b0f0 100755 --- a/3.12-minimal/s2i/bin/assemble +++ b/3.12-minimal/s2i/bin/assemble @@ -53,7 +53,6 @@ mv /tmp/src/* "$HOME" # set permissions for any installed artifacts fix-permissions /opt/app-root -P - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global] diff --git a/3.12/Dockerfile.c10s b/3.12/Dockerfile.c10s index 0ff5e778..38b2fa36 100644 --- a/3.12/Dockerfile.c10s +++ b/3.12/Dockerfile.c10s @@ -48,12 +48,6 @@ COPY 3.12/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.12/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.12/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -61,16 +55,6 @@ COPY 3.12/root/opt/wheels /opt/wheels # writable as OpenShift default security model is to run the container # under random UID. RUN python3.12 -m venv ${APP_ROOT} && \ -# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ -# We have to upgrade pip to a newer verison because \ -# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ -# support platforms like ppc64le, aarch64 or armv7 \ -# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ -# because it's tested better then whatever version from PyPI and contains useful patches. \ -# We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ -# to reinstall itself in the next build phases in the assemble script if user wants the latest version \ -${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ -rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ # The following echo adds the unset command for the variables set below to the \ diff --git a/3.12/Dockerfile.c9s b/3.12/Dockerfile.c9s index 22461d24..e7a042b4 100644 --- a/3.12/Dockerfile.c9s +++ b/3.12/Dockerfile.c9s @@ -49,12 +49,6 @@ COPY 3.12/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.12/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.12/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -62,16 +56,6 @@ COPY 3.12/root/opt/wheels /opt/wheels # writable as OpenShift default security model is to run the container # under random UID. RUN python3.12 -m venv ${APP_ROOT} && \ -# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ -# We have to upgrade pip to a newer verison because \ -# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ -# support platforms like ppc64le, aarch64 or armv7 \ -# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ -# because it's tested better then whatever version from PyPI and contains useful patches. \ -# We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ -# to reinstall itself in the next build phases in the assemble script if user wants the latest version \ -${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ -rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ # The following echo adds the unset command for the variables set below to the \ diff --git a/3.12/Dockerfile.rhel8 b/3.12/Dockerfile.rhel8 index 46cb2abf..578cbfe5 100644 --- a/3.12/Dockerfile.rhel8 +++ b/3.12/Dockerfile.rhel8 @@ -54,12 +54,6 @@ COPY 3.12/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.12/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.12/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -68,16 +62,6 @@ COPY 3.12/root/opt/wheels /opt/wheels # under random UID. RUN \ python3.12 -m venv ${APP_ROOT} && \ - # Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ - # We have to upgrade pip to a newer verison because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions && \ diff --git a/3.12/Dockerfile.rhel9 b/3.12/Dockerfile.rhel9 index 27b6f4de..056a56b5 100644 --- a/3.12/Dockerfile.rhel9 +++ b/3.12/Dockerfile.rhel9 @@ -53,12 +53,6 @@ COPY 3.12/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.12/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.12/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -67,16 +61,6 @@ COPY 3.12/root/opt/wheels /opt/wheels # under random UID. RUN \ python3.12 -m venv ${APP_ROOT} && \ - # Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ - # We have to upgrade pip to a newer verison because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions && \ diff --git a/3.12/root/opt/wheels b/3.12/root/opt/wheels deleted file mode 120000 index 4eabc067..00000000 --- a/3.12/root/opt/wheels +++ /dev/null @@ -1 +0,0 @@ -../../../src/root/opt/wheels/ \ No newline at end of file diff --git a/3.12/s2i/bin/assemble b/3.12/s2i/bin/assemble index 34a68dbb..c498b0f0 100755 --- a/3.12/s2i/bin/assemble +++ b/3.12/s2i/bin/assemble @@ -53,7 +53,6 @@ mv /tmp/src/* "$HOME" # set permissions for any installed artifacts fix-permissions /opt/app-root -P - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global] diff --git a/3.13-minimal/Dockerfile.c10s b/3.13-minimal/Dockerfile.c10s index 34031864..04023b92 100644 --- a/3.13-minimal/Dockerfile.c10s +++ b/3.13-minimal/Dockerfile.c10s @@ -66,13 +66,6 @@ COPY 3.13-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.13-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.13-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -86,15 +79,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.13 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.13-minimal/Dockerfile.fedora b/3.13-minimal/Dockerfile.fedora deleted file mode 100644 index 16f4e382..00000000 --- a/3.13-minimal/Dockerfile.fedora +++ /dev/null @@ -1,104 +0,0 @@ -FROM quay.io/fedora/fedora-minimal:42 - - -EXPOSE 8080 - -ENV PYTHON_VERSION=3.13 \ - PYTHONUNBUFFERED=1 \ - PYTHONIOENCODING=UTF-8 \ - LC_ALL=en_US.UTF-8 \ - LANG=en_US.UTF-8 \ - CNB_STACK_ID=com.redhat.stacks.ubi-python-313 \ - CNB_USER_ID=1001 \ - CNB_GROUP_ID=0 \ - PIP_NO_CACHE_DIR=off \ - # The following variables are usually available from parent s2i images \ - STI_SCRIPTS_PATH=/usr/libexec/s2i \ - APP_ROOT=/opt/app-root \ - HOME=/opt/app-root/src \ - PLATFORM="el" - -# /opt/app-root/bin - the main venv -# /opt/app-root/src/bin - app-specific binaries -# /opt/app-root/src/.local/bin - tools like pipenv -ENV PATH=$APP_ROOT/bin:$HOME/bin:$HOME/.local/bin:$PATH - -# Ensure the virtual environment is active in interactive shells -ENV BASH_ENV=${APP_ROOT}/bin/activate \ - ENV=${APP_ROOT}/bin/activate \ - PROMPT_COMMAND=". ${APP_ROOT}/bin/activate" - -ENV SUMMARY="Minimal platform for building and running Python $PYTHON_VERSION applications" \ - DESCRIPTION="Python $PYTHON_VERSION available as container is a base platform for \ -building and running various Python $PYTHON_VERSION applications and frameworks. \ -Python is an easy to learn, powerful programming language. It has efficient high-level \ -data structures and a simple but effective approach to object-oriented programming. \ -Python's elegant syntax and dynamic typing, together with its interpreted nature, \ -make it an ideal language for scripting and rapid application development in many areas \ -on most platforms." - -LABEL summary="$SUMMARY" \ - description="$DESCRIPTION" \ - io.k8s.description="$DESCRIPTION" \ - io.k8s.display-name="Python 3.13" \ - io.openshift.expose-services="8080:http" \ - io.openshift.tags="builder,python,python313,python-313,rh-python313" \ - com.redhat.component="python-313-container" \ - name="fedora/python-313-minimal" \ - usage="s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.13-minimal/test/setup-test-app/ ubi/python-313-minimal python-sample-app" \ - com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \ - io.buildpacks.stack.id="com.redhat.stacks.ubi-python-313-minimal" \ - maintainer="SoftwareCollections.org " - -# Very minimal set of packages -# Python is obvious in the Python container :) -# glibc-langpack-en is needed to set locale to en_US and disable warning about it -# findutils - find command is needed for fix-permissions script -# nss_wrapper - used in generate_container_user script -RUN INSTALL_PKGS="python3.13 glibc-langpack-en findutils nss_wrapper-libs" && \ - microdnf -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \ - microdnf -y clean all --enablerepo='*' - -# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH. -COPY 3.13-minimal/s2i/bin/ $STI_SCRIPTS_PATH - -# Copy extra files to the image. -COPY 3.13-minimal/root/ / - -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.13-minimal/root/opt/wheels /opt/wheels - -# This command sets (and also creates if necessary) -# the home directory - it has to be done here so the latter -# fix-permissions fixes this directory as well. -WORKDIR ${HOME} - -# - Create a Python virtual environment for use by any application to avoid -# potential conflicts with Python packages preinstalled in the main Python -# installation. -# - In order to drop the root user, we have to make some directories world -# writable as OpenShift default security model is to run the container -# under random UID. -RUN \ - python3.13 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ - chown -R 1001:0 ${APP_ROOT} && \ - fix-permissions ${APP_ROOT} -P && \ - rpm-file-permissions - -USER 1001 - -# Set the default CMD to print the usage of the language image. -CMD $STI_SCRIPTS_PATH/usage diff --git a/3.13-minimal/README.md b/3.13-minimal/README.md index d9c56abb..0f7f60a9 100644 --- a/3.13-minimal/README.md +++ b/3.13-minimal/README.md @@ -13,7 +13,7 @@ The image is built on top of the [official CentOS Stream base containers](quay.i To pull the Python 3.13 minimal container image to build on, run ``` -podman pull quay.io/fedora/python-313-minimal +podman pull quay.io/sclorg/python-313-minimal-c10s ``` Description diff --git a/3.13-minimal/root/opt/wheels b/3.13-minimal/root/opt/wheels deleted file mode 120000 index 4eabc067..00000000 --- a/3.13-minimal/root/opt/wheels +++ /dev/null @@ -1 +0,0 @@ -../../../src/root/opt/wheels/ \ No newline at end of file diff --git a/3.13-minimal/s2i/bin/assemble b/3.13-minimal/s2i/bin/assemble index f415fe30..392950ed 100755 --- a/3.13-minimal/s2i/bin/assemble +++ b/3.13-minimal/s2i/bin/assemble @@ -53,7 +53,6 @@ mv /tmp/src/* "$HOME" # set permissions for any installed artifacts fix-permissions /opt/app-root -P - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global] diff --git a/3.13/Dockerfile.c10s b/3.13/Dockerfile.c10s index 87196fe3..f19afa59 100644 --- a/3.13/Dockerfile.c10s +++ b/3.13/Dockerfile.c10s @@ -49,12 +49,6 @@ COPY 3.13/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.13/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.13/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -62,16 +56,6 @@ COPY 3.13/root/opt/wheels /opt/wheels # writable as OpenShift default security model is to run the container # under random UID. RUN python3.13 -m venv ${APP_ROOT} && \ -# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ -# We have to upgrade pip to a newer verison because \ -# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ -# support platforms like ppc64le, aarch64 or armv7 \ -# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ -# because it's tested better then whatever version from PyPI and contains useful patches. \ -# We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ -# to reinstall itself in the next build phases in the assemble script if user wants the latest version \ -${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ -rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ # The following echo adds the unset command for the variables set below to the \ diff --git a/3.13/Dockerfile.fedora b/3.13/Dockerfile.fedora deleted file mode 100644 index c8b9bbdd..00000000 --- a/3.13/Dockerfile.fedora +++ /dev/null @@ -1,88 +0,0 @@ -# This image provides a Python 3.13 environment you can use to run your Python -# applications. -FROM quay.io/fedora/s2i-base:42 - -EXPOSE 8080 - -ENV PYTHON_VERSION=3.13 \ - PATH=$HOME/.local/bin/:$PATH \ - PYTHONUNBUFFERED=1 \ - PYTHONIOENCODING=UTF-8 \ - LC_ALL=en_US.UTF-8 \ - LANG=en_US.UTF-8 \ - PIP_NO_CACHE_DIR=off - -ENV NAME=python3 \ - ARCH=x86_64 - -ENV SUMMARY="Platform for building and running Python $PYTHON_VERSION applications" \ - DESCRIPTION="Python $PYTHON_VERSION available as container is a base platform for \ -building and running various Python $PYTHON_VERSION applications and frameworks. \ -Python is an easy to learn, powerful programming language. It has efficient high-level \ -data structures and a simple but effective approach to object-oriented programming. \ -Python's elegant syntax and dynamic typing, together with its interpreted nature, \ -make it an ideal language for scripting and rapid application development in many areas \ -on most platforms." - -LABEL summary="$SUMMARY" \ - description="$DESCRIPTION" \ - io.k8s.description="$DESCRIPTION" \ - io.k8s.display-name="Python 3.13" \ - io.openshift.expose-services="8080:http" \ - io.openshift.tags="builder,python,python313,python-313,rh-python313" \ - com.redhat.component="$NAME" \ - name="fedora/$NAME-313" \ - usage="s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.13/test/setup-test-app/ quay.io/fedora/$NAME-313 python-sample-app" \ - maintainer="SoftwareCollections.org " - -RUN INSTALL_PKGS="python3 python3-devel python3-setuptools python3-pip nss_wrapper-libs \ - httpd httpd-devel atlas-devel gcc-gfortran libffi-devel \ - libtool-ltdl enchant redhat-rpm-config krb5-devel" && \ - dnf -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \ - rpm -V $INSTALL_PKGS && \ - dnf -y clean all --enablerepo='*' - -# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH. -COPY 3.13/s2i/bin/ $STI_SCRIPTS_PATH - -# Copy extra files to the image. -COPY 3.13/root/ / - -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.13/root/opt/wheels /opt/wheels -# - Create a Python virtual environment for use by any application to avoid -# potential conflicts with Python packages preinstalled in the main Python -# installation. -# - In order to drop the root user, we have to make some directories world -# writable as OpenShift default security model is to run the container -# under random UID. -RUN python3.13 -m venv ${APP_ROOT} && \ -# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ -# We have to upgrade pip to a newer verison because \ -# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ -# support platforms like ppc64le, aarch64 or armv7 \ -# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ -# because it's tested better then whatever version from PyPI and contains useful patches. \ -# We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ -# to reinstall itself in the next build phases in the assemble script if user wants the latest version \ -${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ -rm -r /opt/wheels && \ -chown -R 1001:0 ${APP_ROOT} && \ -fix-permissions ${APP_ROOT} -P && \ -# The following echo adds the unset command for the variables set below to the \ -# venv activation script. This prevents the virtual environment from being \ -# activated multiple times and also every time the prompt is rendered. \ -echo "unset BASH_ENV PROMPT_COMMAND ENV" >> ${APP_ROOT}/bin/activate -# Ensure the virtualenv is activated in interactive shells -ENV BASH_ENV="${APP_ROOT}/bin/activate" \ - ENV="${APP_ROOT}/bin/activate" \ - PROMPT_COMMAND=". ${APP_ROOT}/bin/activate" - -USER 1001 - -# Set the default CMD to print the usage of the language image. -CMD $STI_SCRIPTS_PATH/usage diff --git a/3.13/README.md b/3.13/README.md index 7bd4ddfd..3653ed10 100644 --- a/3.13/README.md +++ b/3.13/README.md @@ -76,7 +76,7 @@ To use the Python image in a Dockerfile, follow these steps: #### 1. Pull a base builder image to build on ``` -podman pull quay.io/fedora/python-313 +podman pull quay.io/sclorg/python-313-c10s ``` #### 2. Pull and application code @@ -107,7 +107,7 @@ prepared for a future flawless switch to a newer or different platform. To use the Source-to-Image scripts and build an image using a Dockerfile, create a Dockerfile with this content: ``` -FROM quay.io/fedora/python-313 +FROM quay.io/sclorg/python-313-c10s # Add application sources to a directory that the assemble script expects them # and set permissions so that the container runs without root access @@ -127,7 +127,7 @@ If you decide not to use the Source-to-Image scripts, you will need to manually Example Dockerfile for a simple Django application: ``` -FROM quay.io/fedora/python-313 +FROM quay.io/sclorg/python-313-c10s # Add application sources with correct permissions for OpenShift USER 0 diff --git a/3.13/root/opt/wheels b/3.13/root/opt/wheels deleted file mode 120000 index 4eabc067..00000000 --- a/3.13/root/opt/wheels +++ /dev/null @@ -1 +0,0 @@ -../../../src/root/opt/wheels/ \ No newline at end of file diff --git a/3.13/s2i/bin/assemble b/3.13/s2i/bin/assemble index f415fe30..392950ed 100755 --- a/3.13/s2i/bin/assemble +++ b/3.13/s2i/bin/assemble @@ -53,7 +53,6 @@ mv /tmp/src/* "$HOME" # set permissions for any installed artifacts fix-permissions /opt/app-root -P - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global] diff --git a/3.14-minimal/Dockerfile.c10s b/3.14-minimal/Dockerfile.c10s index 5c1cf880..2b600668 100644 --- a/3.14-minimal/Dockerfile.c10s +++ b/3.14-minimal/Dockerfile.c10s @@ -65,13 +65,6 @@ COPY 3.14-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.14-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.14-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.14 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.14-minimal/Dockerfile.c9s b/3.14-minimal/Dockerfile.c9s index 9c9883b8..7e03ec70 100644 --- a/3.14-minimal/Dockerfile.c9s +++ b/3.14-minimal/Dockerfile.c9s @@ -65,13 +65,6 @@ COPY 3.14-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.14-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.14-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.14 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.14-minimal/Dockerfile.fedora b/3.14-minimal/Dockerfile.fedora index ca0fde42..6e05e7d8 100644 --- a/3.14-minimal/Dockerfile.fedora +++ b/3.14-minimal/Dockerfile.fedora @@ -1,4 +1,4 @@ -FROM quay.io/fedora/fedora-minimal:43 +FROM quay.io/fedora/fedora-minimal:44 EXPOSE 8080 @@ -65,13 +65,6 @@ COPY 3.14-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.14-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.14-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.14 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.14-minimal/Dockerfile.rhel10 b/3.14-minimal/Dockerfile.rhel10 index cad80210..b5f24873 100644 --- a/3.14-minimal/Dockerfile.rhel10 +++ b/3.14-minimal/Dockerfile.rhel10 @@ -65,13 +65,6 @@ COPY 3.14-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.14-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.14-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.14 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.14-minimal/Dockerfile.rhel9 b/3.14-minimal/Dockerfile.rhel9 index 0eea5238..207b840d 100644 --- a/3.14-minimal/Dockerfile.rhel9 +++ b/3.14-minimal/Dockerfile.rhel9 @@ -65,13 +65,6 @@ COPY 3.14-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.14-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.14-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.14 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.14-minimal/root/opt/wheels b/3.14-minimal/root/opt/wheels deleted file mode 120000 index 4eabc067..00000000 --- a/3.14-minimal/root/opt/wheels +++ /dev/null @@ -1 +0,0 @@ -../../../src/root/opt/wheels/ \ No newline at end of file diff --git a/3.14-minimal/s2i/bin/assemble b/3.14-minimal/s2i/bin/assemble index b5cfeb6f..c4981b79 100755 --- a/3.14-minimal/s2i/bin/assemble +++ b/3.14-minimal/s2i/bin/assemble @@ -53,7 +53,6 @@ mv /tmp/src/* "$HOME" # set permissions for any installed artifacts fix-permissions /opt/app-root -P - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global] diff --git a/3.14/Dockerfile.c9s b/3.14/Dockerfile.c9s index 329aeaa7..8482bde8 100644 --- a/3.14/Dockerfile.c9s +++ b/3.14/Dockerfile.c9s @@ -49,12 +49,6 @@ COPY 3.14/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.14/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.14/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -62,16 +56,6 @@ COPY 3.14/root/opt/wheels /opt/wheels # writable as OpenShift default security model is to run the container # under random UID. RUN python3.14 -m venv ${APP_ROOT} && \ -# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ -# We have to upgrade pip to a newer verison because \ -# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ -# support platforms like ppc64le, aarch64 or armv7 \ -# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ -# because it's tested better then whatever version from PyPI and contains useful patches. \ -# We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ -# to reinstall itself in the next build phases in the assemble script if user wants the latest version \ -${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ -rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ # The following echo adds the unset command for the variables set below to the \ diff --git a/3.14/Dockerfile.fedora b/3.14/Dockerfile.fedora index b46f3b3f..91326fca 100644 --- a/3.14/Dockerfile.fedora +++ b/3.14/Dockerfile.fedora @@ -1,6 +1,6 @@ # This image provides a Python 3.14 environment you can use to run your Python # applications. -FROM quay.io/fedora/s2i-base:43 +FROM quay.io/fedora/s2i-base:44 EXPOSE 8080 @@ -48,12 +48,6 @@ COPY 3.14/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.14/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.14/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -61,16 +55,6 @@ COPY 3.14/root/opt/wheels /opt/wheels # writable as OpenShift default security model is to run the container # under random UID. RUN python3.14 -m venv ${APP_ROOT} && \ -# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ -# We have to upgrade pip to a newer verison because \ -# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ -# support platforms like ppc64le, aarch64 or armv7 \ -# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ -# because it's tested better then whatever version from PyPI and contains useful patches. \ -# We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ -# to reinstall itself in the next build phases in the assemble script if user wants the latest version \ -${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ -rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ # The following echo adds the unset command for the variables set below to the \ diff --git a/3.14/Dockerfile.rhel9 b/3.14/Dockerfile.rhel9 index 44854fd9..21536c17 100644 --- a/3.14/Dockerfile.rhel9 +++ b/3.14/Dockerfile.rhel9 @@ -53,12 +53,6 @@ COPY 3.14/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.14/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.14/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -67,16 +61,6 @@ COPY 3.14/root/opt/wheels /opt/wheels # under random UID. RUN \ python3.14 -m venv ${APP_ROOT} && \ - # Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ - # We have to upgrade pip to a newer verison because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions && \ diff --git a/3.14/root/opt/wheels b/3.14/root/opt/wheels deleted file mode 120000 index 4eabc067..00000000 --- a/3.14/root/opt/wheels +++ /dev/null @@ -1 +0,0 @@ -../../../src/root/opt/wheels/ \ No newline at end of file diff --git a/3.14/s2i/bin/assemble b/3.14/s2i/bin/assemble index b5cfeb6f..c4981b79 100755 --- a/3.14/s2i/bin/assemble +++ b/3.14/s2i/bin/assemble @@ -53,7 +53,6 @@ mv /tmp/src/* "$HOME" # set permissions for any installed artifacts fix-permissions /opt/app-root -P - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global] diff --git a/3.6/Dockerfile.rhel8 b/3.6/Dockerfile.rhel8 index 4ea41730..b2518494 100644 --- a/3.6/Dockerfile.rhel8 +++ b/3.6/Dockerfile.rhel8 @@ -62,7 +62,6 @@ COPY 3.6/root/ / # under random UID. RUN \ virtualenv-$PYTHON_VERSION ${APP_ROOT} && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions && \ diff --git a/3.6/root/opt/wheels b/3.6/root/opt/wheels deleted file mode 120000 index 4eabc067..00000000 --- a/3.6/root/opt/wheels +++ /dev/null @@ -1 +0,0 @@ -../../../src/root/opt/wheels/ \ No newline at end of file diff --git a/3.6/s2i/bin/assemble b/3.6/s2i/bin/assemble index a2206292..a33d2d98 100755 --- a/3.6/s2i/bin/assemble +++ b/3.6/s2i/bin/assemble @@ -9,13 +9,8 @@ function should_collectstatic() { } function virtualenv_bin() { - if head "/etc/redhat-release" | grep -q "^CentOS Linux release 7" || \ - head "/etc/redhat-release" | grep -q "^Red Hat Enterprise Linux\( Server\)\? release 7" || \ - head "/etc/redhat-release" | grep -q "^Fedora release"; then - virtualenv $1 - else + # Python 3.6 (only on UBI 8) uses the virtualenv package virtualenv-${PYTHON_VERSION} $1 - fi } # Install pipenv or micropipenv to the separate virtualenv to isolate it @@ -57,16 +52,6 @@ mv /tmp/src/* "$HOME" # set permissions for any installed artifacts fix-permissions /opt/app-root -P -# Python <3.7 only code, Python 3.7+ uses bundled wheel from Fedora -# We have to first upgrade pip to at least 19.3 because -# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels -# support platforms like ppc64le, aarch64 or armv7 -echo "---> Upgrading pip to latest version supported for Python $PYTHON_VERSION ..." -if ! pip install -U "pip"; then - echo "WARNING: Installation of 'pip' failed, trying again from official PyPI with pip --isolated install" - pip install --isolated -U "pip" -fi - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global] diff --git a/3.9-minimal/Dockerfile.c9s b/3.9-minimal/Dockerfile.c9s index f5f2d5fc..2cf8d827 100644 --- a/3.9-minimal/Dockerfile.c9s +++ b/3.9-minimal/Dockerfile.c9s @@ -65,13 +65,6 @@ COPY 3.9-minimal/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.9-minimal/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.9-minimal/root/opt/wheels /opt/wheels - # This command sets (and also creates if necessary) # the home directory - it has to be done here so the latter # fix-permissions fixes this directory as well. @@ -85,15 +78,6 @@ WORKDIR ${HOME} # under random UID. RUN \ python3.9 -m venv ${APP_ROOT} && \ - # We have to upgrade pip to a newer version because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions diff --git a/3.9-minimal/root/opt/wheels b/3.9-minimal/root/opt/wheels deleted file mode 120000 index 4eabc067..00000000 --- a/3.9-minimal/root/opt/wheels +++ /dev/null @@ -1 +0,0 @@ -../../../src/root/opt/wheels/ \ No newline at end of file diff --git a/3.9-minimal/s2i/bin/assemble b/3.9-minimal/s2i/bin/assemble index bbe66b8f..4e500eb4 100755 --- a/3.9-minimal/s2i/bin/assemble +++ b/3.9-minimal/s2i/bin/assemble @@ -53,7 +53,6 @@ mv /tmp/src/* "$HOME" # set permissions for any installed artifacts fix-permissions /opt/app-root -P - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global] diff --git a/3.9/Dockerfile.c9s b/3.9/Dockerfile.c9s index c3475d9f..2183d7bb 100644 --- a/3.9/Dockerfile.c9s +++ b/3.9/Dockerfile.c9s @@ -49,12 +49,6 @@ COPY 3.9/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.9/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.9/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -62,16 +56,6 @@ COPY 3.9/root/opt/wheels /opt/wheels # writable as OpenShift default security model is to run the container # under random UID. RUN python3.9 -m venv ${APP_ROOT} && \ -# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ -# We have to upgrade pip to a newer verison because \ -# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ -# support platforms like ppc64le, aarch64 or armv7 \ -# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ -# because it's tested better then whatever version from PyPI and contains useful patches. \ -# We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ -# to reinstall itself in the next build phases in the assemble script if user wants the latest version \ -${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ -rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ # The following echo adds the unset command for the variables set below to the \ diff --git a/3.9/Dockerfile.rhel9 b/3.9/Dockerfile.rhel9 index 9fd315d4..bb569db8 100644 --- a/3.9/Dockerfile.rhel9 +++ b/3.9/Dockerfile.rhel9 @@ -53,12 +53,6 @@ COPY 3.9/s2i/bin/ $STI_SCRIPTS_PATH # Copy extra files to the image. COPY 3.9/root/ / -# Python 3.7+ only -# Yes, the directory below is already copied by the previous command. -# The problem here is that the wheels directory is copied as a symlink. -# Only if you specify symlink directly as a source, COPY copies all the -# files from the symlink destination. -COPY 3.9/root/opt/wheels /opt/wheels # - Create a Python virtual environment for use by any application to avoid # potential conflicts with Python packages preinstalled in the main Python # installation. @@ -67,16 +61,6 @@ COPY 3.9/root/opt/wheels /opt/wheels # under random UID. RUN \ python3.9 -m venv ${APP_ROOT} && \ - # Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \ - # We have to upgrade pip to a newer verison because \ - # pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \ - # support platforms like ppc64le, aarch64 or armv7 \ - # We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \ - # because it's tested better then whatever version from PyPI and contains useful patches. \ - # We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \ - # to reinstall itself in the next build phases in the assemble script if user wants the latest version \ - ${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \ - rm -r /opt/wheels && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P && \ rpm-file-permissions && \ diff --git a/3.9/root/opt/wheels b/3.9/root/opt/wheels deleted file mode 120000 index 4eabc067..00000000 --- a/3.9/root/opt/wheels +++ /dev/null @@ -1 +0,0 @@ -../../../src/root/opt/wheels/ \ No newline at end of file diff --git a/3.9/s2i/bin/assemble b/3.9/s2i/bin/assemble index bbe66b8f..4e500eb4 100755 --- a/3.9/s2i/bin/assemble +++ b/3.9/s2i/bin/assemble @@ -53,7 +53,6 @@ mv /tmp/src/* "$HOME" # set permissions for any installed artifacts fix-permissions /opt/app-root -P - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global] diff --git a/README.md b/README.md index 42c46e6a..0ec8553f 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ Table start |3.9-minimal|
✓`quay.io/sclorg/python-39-minimal-c9s`
|||||| |3.12|
✓`quay.io/sclorg/python-312-c9s`
|
✓`quay.io/sclorg/python-312-c10s`
||
✓`registry.redhat.io/rhel8/python-312`
|
✓`registry.redhat.io/rhel9/python-312`
|| |3.12-minimal|
✓`quay.io/sclorg/python-312-minimal-c9s`
|
✓`quay.io/sclorg/python-312-minimal-c10s`
||
✓`registry.redhat.io/rhel8/python-312-minimal`
|
✓`registry.redhat.io/rhel9/python-312-minimal`
|
✓`registry.redhat.io/rhel10/python-312-minimal`
| -|3.13||
✓`quay.io/sclorg/python-313-c10s`
|
✓`quay.io/fedora/python-313`
|||| -|3.13-minimal||
✓`quay.io/sclorg/python-313-minimal-c10s`
|
✓`quay.io/fedora/python-313-minimal`
|||| +|3.13||
✓`quay.io/sclorg/python-313-c10s`
||||| +|3.13-minimal||
✓`quay.io/sclorg/python-313-minimal-c10s`
||||| |3.14|
✓`quay.io/sclorg/python-314-c9s`
||
✓`quay.io/fedora/python-314`
||
✓`registry.redhat.io/rhel9/python-314`
|| |3.14-minimal|
✓`quay.io/sclorg/python-314-minimal-c9s`
|
✓`quay.io/sclorg/python-314-minimal-c10s`
|
✓`quay.io/fedora/python-314-minimal`
||
✓`registry.redhat.io/rhel9/python-314-minimal`
|
✓`registry.redhat.io/rhel10/python-314-minimal`
| Upgrading pip to latest version supported for Python $PYTHON_VERSION ..." -if ! pip install -U "pip"; then - echo "WARNING: Installation of 'pip' failed, trying again from official PyPI with pip --isolated install" - pip install --isolated -U "pip" -fi -{% endif %} - if [[ ! -z "$PIP_INDEX_URL" ]]; then echo "---> Creating pip.ini config file" echo "[global]