This repository provides a Dockerfile for building a Python 3.12 environment on Ubuntu 18.04. It also includes automation to keep the Python 3.12 patch version up to date using GitHub Actions.
The prebuilt image is available on Docker Hub: kuncodes/python-3.12-ubuntu-18.04
Pull it directly with:
docker pull kuncodes/python-3.12-ubuntu-18.04
This image is designed for compiling Python binaries with Nuitka on an older Ubuntu base. Using Ubuntu 18.04 ensures compatibility with older versions of glibc, making the resulting binaries runnable on a wider range of Linux distributions, including older ones.
- Dockerfile: Builds Python 3.12 on Ubuntu 18.04.
- Automated Patch Updates: A GitHub Actions workflow (
update-python-patch.yml
) runs daily to check for the latest Python 3.12.x patch release and updates the Dockerfile accordingly. - Pull Request Automation: When a new patch is detected, the workflow automatically commits the change and opens a pull request.
docker build -t python:3.12-ubuntu18.04 .
docker run -it python:3.12-ubuntu18.04 python --version
You can use this image to compile your Python scripts with Nuitka, ensuring the resulting binaries are compatible with older Linux distributions:
docker run --rm -v "$PWD:/src" -w /src python:3.12-ubuntu18.04 \
nuitka --onefile your_script.py
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE
file for details.