diff --git a/Dockerfile b/Dockerfile index c0ec0b4..df410e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -# This image provides a Python 3.7 environment you can use to run your Python +# This image provides a Python 3.8 environment you can use to run your Python # applications. -FROM registry.fedoraproject.org/f31/s2i-base:latest +FROM registry.fedoraproject.org/f32/s2i-base:latest EXPOSE 8080 -ENV PYTHON_VERSION=3.7 \ +ENV PYTHON_VERSION=3.8 \ PATH=$HOME/.local/bin/:$PATH \ PYTHONUNBUFFERED=1 \ PYTHONIOENCODING=UTF-8 \ @@ -29,13 +29,13 @@ on most platforms." LABEL summary="$SUMMARY" \ description="$DESCRIPTION" \ io.k8s.description="$DESCRIPTION" \ - io.k8s.display-name="Python 3.7" \ + io.k8s.display-name="Python 3.8" \ io.openshift.expose-services="8080:http" \ - io.openshift.tags="builder,python,python37,python-37,rh-python37" \ + io.openshift.tags="builder,python,python38,python-38,rh-python38" \ com.redhat.component="$NAME" \ name="$FGC/$NAME" \ version="$VERSION" \ - usage="s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.7/test/setup-test-app/ $FGC/$NAME python-sample-app" \ + usage="s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.8/test/setup-test-app/ $FGC/$NAME python-sample-app" \ maintainer="SoftwareCollections.org " RUN INSTALL_PKGS="python3 python3-devel python3-setuptools python3-pip python3-virtualenv \ diff --git a/README.md b/README.md index 5802aee..8b8cc26 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -Python 3.7 container image +Python 3.8 container image =================== -This container image includes Python 3.7 as a [S2I](https://github.com/openshift/source-to-image) base image for your Python 3.7 applications. +This container image includes Python 3.8 as a [S2I](https://github.com/openshift/source-to-image) base image for your Python 3.8 applications. Users can choose between RHEL and CentOS based builder images. The RHEL images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/), the CentOS images are available on [Docker Hub](https://hub.docker.com/r/centos/), @@ -14,15 +14,17 @@ Note: while the examples in this README are calling `podman`, you can replace an Description ----------- -Python 3.7 available as container is a base platform for -building and running various Python 3.7 applications and frameworks. +Python 3.8 available as container is a base platform for +building and running various Python 3.8 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. -This container image includes an npm utility, so users can use it to install JavaScript +This container image includes an npm utility +(see [base image repository](https://github.com/sclorg/s2i-base-container/tree/master/base)), +so users can use it to install JavaScript modules for their web applications. There is no guarantee for any specific npm or nodejs version, that is included in the image; those versions can be changed anytime and the nodejs itself is included just to make the npm work. @@ -30,18 +32,18 @@ the nodejs itself is included just to make the npm work. Usage --------------------- -For this, we will assume that you are using the `rhscl/python-37-rhel7 image`, available via `python:3.7` imagestream tag in Openshift. -Building a simple [python-sample-app](https://github.com/sclorg/s2i-python-container/tree/master/3.7/test/setup-test-app) application +For this, we will assume that you are using the `rhscl/python-38-rhel7 image`, available via `python:3.8` imagestream tag in Openshift. +Building a simple [python-sample-app](https://github.com/sclorg/s2i-python-container/tree/master/3.8/test/setup-test-app) application in Openshift can be achieved with the following step: ``` - oc new-app python:3.6~https://github.com/sclorg/s2i-python-container.git --context-dir=3.7/test/setup-test-app/ + oc new-app python:3.8~https://github.com/sclorg/s2i-python-container.git --context-dir=3.8/test/setup-test-app/ ``` The same application can also be built using the standalone [S2I](https://github.com/openshift/source-to-image) application on systems that have it available: ``` - $ s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.7/test/setup-test-app/ rhscl/python-37-rhel7 python-sample-app + $ s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.8/test/setup-test-app/ rhscl/python-38-rhel7 python-sample-app ``` **Accessing the application:** @@ -82,7 +84,7 @@ file inside your source code repository. If using `setup.py` for installing the application, the `MODULE_NAME` part can be read from there. For an example, see - [setup-test-app](https://github.com/sclorg/s2i-python-container/tree/master/3.7/test/setup-test-app). + [setup-test-app](https://github.com/sclorg/s2i-python-container/tree/master/3.8/test/setup-test-app). * **APP_HOME** diff --git a/root/opt/app-root/etc/scl_enable b/root/opt/app-root/etc/scl_enable index 40016b1..fd98aa1 100644 --- a/root/opt/app-root/etc/scl_enable +++ b/root/opt/app-root/etc/scl_enable @@ -4,6 +4,6 @@ unset BASH_ENV PROMPT_COMMAND ENV if head "/etc/redhat-release" | grep -q "^CentOS Linux release 7" || \ head "/etc/redhat-release" | grep -q "^Red Hat Enterprise Linux\( Server\)\? release 7"; then - source scl_source enable httpd24 $NODEJS_SCL rh-python37 + source scl_source enable httpd24 $NODEJS_SCL rh-python38 fi source /opt/app-root/bin/activate diff --git a/s2i/bin/usage b/s2i/bin/usage index b1c7448..9caff40 100755 --- a/s2i/bin/usage +++ b/s2i/bin/usage @@ -5,12 +5,12 @@ NAMESPACE=centos [[ $DISTRO =~ rhel* ]] && NAMESPACE=rhscl cat <| local image_tag_a diff --git a/test/test-lib.sh b/test/test-lib.sh index 674eafd..b959c34 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -254,7 +254,7 @@ function ct_npm_works() { local tmpdir tmpdir=$(mktemp -d) : " Testing npm in the container image" - cid_file="${tmpdir}/cid" + local cid_file="${tmpdir}/cid" if ! docker run --rm "${IMAGE_NAME}" /bin/bash -c "npm --version" >"${tmpdir}/version" ; then echo "ERROR: 'npm --version' does not work inside the image ${IMAGE_NAME}." >&2 return 1