Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 1.82 KB

README.md

File metadata and controls

40 lines (23 loc) · 1.82 KB

python-automated-image

Build a python image to be used as a base image

build-publish-python-image

build-publish-python-image-trimmed-tag

Explanations

For example, if PYTHON_VERSION is 3.10.12rc1 (where rc1 denotes a release candidate), ${PYTHON_VERSION%%[a-z]*} would evaluate to 3.10.12. This ensures that only the major and minor numeric parts are used in the URL directory path, as the directory structure on the Python FTP server only includes numeric versions.
  • docker build --build-arg PYTHON_VERSION=3.11 -t my-python-image .

  • PYTHONDONTWRITEBYTECODE=1 --> prevents python from generating .pyc files

How this works

  • we will be inputting python version in the workflow like semvar versions - major.minor.patch versions

  • semvar is mandatory

  • we will then pull the python code from python ftp site and compile them in run time

  • base image used is debian bookworm flavour

  • There are 2 workflows

    • build-python-base-image.yaml
    • build-python-image-trimmed-tag.yaml

As the name suggests the differene between both of them are the tag