Skip to content

Remove EOL F34/Py 3.9 and update Py 3.10 from F35 to F36 #535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ jobs:
fail-fast: false
matrix:
include:
- dockerfile_path: "2.7"
dockerfile: "Dockerfile"
registry_namespace: "centos7"
quayio_username: "QUAY_IMAGE_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_BUILDER_TOKEN"
tag: "centos7"
suffix: "centos7"
- dockerfile_path: "3.8"
dockerfile: "Dockerfile"
registry_namespace: "centos7"
Expand All @@ -35,12 +28,6 @@ jobs:
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
tag: "el8"
suffix: "el8"
- dockerfile_path: "3.9"
dockerfile: "Dockerfile.fedora"
registry_namespace: "fedora"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
tag: "39"
- dockerfile_path: "3.10"
dockerfile: "Dockerfile.fedora"
registry_namespace: "fedora"
Expand Down
10 changes: 5 additions & 5 deletions 2.7/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ mv /tmp/src/* "$HOME"
# set permissions for any installed artifacts
fix-permissions /opt/app-root -P

# Python 2 only code, Python 3 uses bundled wheel from Fedora
# 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 < 9 does not support different packages' versions for Python 2/3
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels
# support platforms like ppc64le, aarch64 or armv7
echo "---> Upgrading pip to version <21.0 (The last Python 2 compatible version) ..."
if ! pip install -U "pip<21.0"; then
echo "WARNING: Installation of 'pip<21.0' failed, trying again from official PyPI with pip --isolated install"
pip install --isolated -U "pip<21.0"
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 "$UPGRADE_PIP_TO_LATEST" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions 3.10/Dockerfile.fedora
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This image provides a Python 3.10 environment you can use to run your Python
# applications.
FROM quay.io/fedora/s2i-base:35
FROM quay.io/fedora/s2i-base:36

EXPOSE 8080

Expand Down Expand Up @@ -50,7 +50,7 @@ COPY 3.10/s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY 3.10/root/ /

# Python 3 only
# 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
Expand All @@ -63,7 +63,7 @@ COPY 3.10/root/opt/wheels /opt/wheels
# writable as OpenShift default security model is to run the container
# under random UID.
RUN python3.10 -m venv ${APP_ROOT} && \
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
# 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 < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
Expand Down
16 changes: 0 additions & 16 deletions 3.6/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ COPY 3.6/s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY 3.6/root/ /

# Python 3 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.6/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.
Expand All @@ -69,16 +63,6 @@ COPY 3.6/root/opt/wheels /opt/wheels
# under random UID.
RUN \
virtualenv-$PYTHON_VERSION ${APP_ROOT} && \
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
# We have to upgrade pip to a newer verison because: \
# * pip < 9 does not support different packages' versions for Python 2/3 \
# * 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 && \
Expand Down
10 changes: 10 additions & 0 deletions 3.6/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ 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 < 9 does not support different packages' versions for Python 2/3
# * 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 "$UPGRADE_PIP_TO_LATEST" ]]; then
echo "---> Upgrading pip, setuptools and wheel to latest version ..."
Expand Down
4 changes: 2 additions & 2 deletions 3.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ COPY 3.8/s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY 3.8/root/ /

# Python 3 only
# 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
Expand All @@ -72,7 +72,7 @@ COPY 3.8/root/opt/wheels /opt/wheels
# under random UID.
RUN source scl_source enable rh-python38 && \
python3.8 -m venv ${APP_ROOT} && \
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
# 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 < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
Expand Down
4 changes: 2 additions & 2 deletions 3.8/Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ COPY 3.8/s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY 3.8/root/ /

# Python 3 only
# 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
Expand All @@ -78,7 +78,7 @@ COPY 3.8/root/opt/wheels /opt/wheels
# under random UID.
RUN source scl_source enable rh-python38 && \
python3.8 -m venv ${APP_ROOT} && \
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
# 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 < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
Expand Down
4 changes: 2 additions & 2 deletions 3.8/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ COPY 3.8/s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY 3.8/root/ /

# Python 3 only
# 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
Expand All @@ -68,7 +68,7 @@ COPY 3.8/root/opt/wheels /opt/wheels
# under random UID.
RUN \
python3.8 -m venv ${APP_ROOT} && \
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
# 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 < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
Expand Down
4 changes: 2 additions & 2 deletions 3.9/Dockerfile.c9s
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ COPY 3.9/s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY 3.9/root/ /

# Python 3 only
# 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
Expand All @@ -63,7 +63,7 @@ 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 only code, Python 2 installs pip from PyPI in the assemble script. \
# 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 < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
Expand Down
89 changes: 0 additions & 89 deletions 3.9/Dockerfile.fedora

This file was deleted.

4 changes: 2 additions & 2 deletions 3.9/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ COPY 3.9/s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY 3.9/root/ /

# Python 3 only
# 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
Expand All @@ -68,7 +68,7 @@ COPY 3.9/root/opt/wheels /opt/wheels
# under random UID.
RUN \
python3.9 -m venv ${APP_ROOT} && \
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
# 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 < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
Expand Down
4 changes: 2 additions & 2 deletions 3.9/Dockerfile.rhel9
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ COPY 3.9/s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY 3.9/root/ /

# Python 3 only
# 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
Expand All @@ -67,7 +67,7 @@ COPY 3.9/root/opt/wheels /opt/wheels
# under random UID.
RUN \
python3.9 -m venv ${APP_ROOT} && \
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
# 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 < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Python versions currently provided are:
* [python-3.8](3.8)
* [python-3.9](3.9)
* [python-3.9 Minimal (tech-preview)](3.9-minimal)
* [python-3.10](3.10)

RHEL versions currently supported are:
* RHEL 7 ([catalog.redhat.com](https://catalog.redhat.com/software/containers/search))
Expand All @@ -60,7 +61,7 @@ CentOS versions currently supported are:
* CentOS 7 ([quay.io/centos7](https://quay.io/organization/centos7))

Fedora versions currently supported are:
* Fedora 34 ([registry.fedoraproject.org](https://registry.fedoraproject.org/repo/f34/python3/tags/))
* Fedora 36 ([registry.fedoraproject.org](https://quay.io/organization/fedora))

Download
--------
Expand Down
2 changes: 1 addition & 1 deletion examples/pin-pipenv-version-test-app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
uWSGI
uWSGI<2.0.20 # The latest version has some compilation issues with Py 3.10
Flask
Loading