From d02b8d5fdfa7c03c6e85382de1f5c071b3368b7b765d99606bcf6b70b17b8008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 20 Jun 2024 12:19:27 +0000 Subject: [PATCH] [info=9f294ab0d1f29104a31071134983d056] OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/python-3.11-image?expand=0&rev=122 --- README.md | 41 +++++++++++++++++++++++++++++++++++++-- python-3.11-image.changes | 5 +++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f0380ac..b3e8d8f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,44 @@ -# The openSUSE Tumbleweed BCI Python 3.11 development container image +# Python 3.11 development container image + ![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green) -Python 3.11 development container based on the openSUSE Tumbleweed Base Container Image. +## Description + +[Python](https://www.python.org/) is an interpreted, interactive, object-oriented, open-source programming language. It incorporates modules, exceptions, dynamic typing, high-level dynamic data types, and classes. It provides interfaces to many system calls, libraries, and various window systems, and it is extensible in C or C++. It is also usable as an extension language for applications that require programmable interfaces. + +## Usage + +To deploy an application, install dependencies, copy the sources, and configure the application's main script: + +```Dockerfile +FROM registry.opensuse.org/opensuse/bci/python:3.11 + +WORKDIR /app + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +CMD [ "python3", "./main-script.py" ] +``` + +Build and run the container image: + +```ShellSession +$ podman build -t my-python-app . +$ podman run -it --rm my-python-app +``` + +To run a single script inside a container, use the following command: + +```ShellSession +$ podman run --rm -v "$PWD":/app:Z -w /app registry.opensuse.org/opensuse/bci/python:3.11 python3 script.py +``` + +## Additional tools + +The Python container image includes [pip](https://pip.pypa.io/), [pipx](https://pipx.pypa.io/), [wheel](https://wheel.readthedocs.io/), Python Development Headers, and Git. ## Licensing diff --git a/python-3.11-image.changes b/python-3.11-image.changes index 194ab7d..7199c6f 100644 --- a/python-3.11-image.changes +++ b/python-3.11-image.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 20 09:53:37 UTC 2024 - Alexandre Vicenzi + +- extend README.md + ------------------------------------------------------------------- Tue Jun 18 17:24:16 UTC 2024 - Dirk Mueller