Skip to content

kun-codes/python-3.12-ubuntu-18.04-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python 3.12 Ubuntu 18.04 Docker Image with Automated Patch Updates

Docker Pulls

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.

Docker Image

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

Why This Image?

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.

Features

  • 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.

Usage

Build the Docker Image

docker build -t python:3.12-ubuntu18.04 .

Run the Docker Image

docker run -it python:3.12-ubuntu18.04 python --version

Example: Compile with Nuitka for Maximum Compatibility

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

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

No releases published

Packages

No packages published