Update from upstream - F35 + Py3.10
This commit is contained in:
parent
b3bc61b518
commit
9e2a157e7c
16 changed files with 385 additions and 188 deletions
20
README.md
20
README.md
|
|
@ -1,7 +1,7 @@
|
|||
Python 3.9 container image
|
||||
Python 3.10 container image
|
||||
=========================
|
||||
|
||||
This container image includes Python 3.9 as a [S2I](https://github.com/openshift/source-to-image) base image for your Python 3.9 applications.
|
||||
This container image includes Python 3.10 as a [S2I](https://github.com/openshift/source-to-image) base image for your Python 3.10 applications.
|
||||
Users can choose between RHEL and CentOS based builder images.
|
||||
The RHEL images are available in the [Red Hat Container Catalog](https://catalog.redhat.com/software/containers/explore),
|
||||
the CentOS images are available on [Quay.io](https://quay.io/organization/centos7),
|
||||
|
|
@ -14,8 +14,8 @@ Note: while the examples in this README are calling `podman`, you can replace an
|
|||
Description
|
||||
-----------
|
||||
|
||||
Python 3.9 available as container is a base platform for
|
||||
building and running various Python 3.9 applications and frameworks.
|
||||
Python 3.10 available as container is a base platform for
|
||||
building and running various Python 3.10 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,
|
||||
|
|
@ -32,12 +32,12 @@ the nodejs itself is included just to make the npm work.
|
|||
Usage in Openshift
|
||||
------------------
|
||||
|
||||
For this, we will assume that you are using the supported image, available via `python:3.9` imagestream tag in Openshift.
|
||||
For this, we will assume that you are using the supported image, available via `python:3.10` imagestream tag in Openshift.
|
||||
Building a simple [python-sample-app](https://github.com/sclorg/django-ex.git) application
|
||||
in Openshift can be achieved with the following step:
|
||||
|
||||
```
|
||||
oc new-app python:3.9~https://github.com/sclorg/django-ex.git
|
||||
oc new-app python:3.10~https://github.com/sclorg/django-ex.git
|
||||
```
|
||||
|
||||
**Accessing the application:**
|
||||
|
|
@ -74,7 +74,7 @@ To use the Python image in a Dockerfile, follow these steps:
|
|||
#### 1. Pull a base builder image to build on
|
||||
|
||||
```
|
||||
podman pull registry.access.redhat.com/ubi8/python-39
|
||||
podman pull registry.fedoraproject.org/f35/python3
|
||||
```
|
||||
|
||||
#### 2. Pull and application code
|
||||
|
|
@ -105,7 +105,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 registry.access.redhat.com/ubi8/python-39
|
||||
FROM registry.fedoraproject.org/f35/python3
|
||||
|
||||
# Add application sources to a directory that the assemble script expects them
|
||||
# and set permissions so that the container runs without root access
|
||||
|
|
@ -125,7 +125,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 registry.access.redhat.com/ubi8/python-39
|
||||
FROM registry.fedoraproject.org/f35/python3
|
||||
|
||||
# Add application sources with correct permissions for OpenShift
|
||||
USER 0
|
||||
|
|
@ -188,7 +188,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.9/test/setup-test-app).
|
||||
[setup-test-app](https://github.com/sclorg/s2i-python-container/tree/master/3.10/test/setup-test-app).
|
||||
|
||||
* **APP_HOME**
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue