https://github.com/kun-codes/python-3.12-ubuntu-18.04-docker
Python 3.12 Docker image based on Ubuntu 18.04
https://github.com/kun-codes/python-3.12-ubuntu-18.04-docker
docker docker-image dockerimage python python312 ubuntu ubuntu1804 ubuntu1804-docker
Last synced: 2 months ago
JSON representation
Python 3.12 Docker image based on Ubuntu 18.04
- Host: GitHub
- URL: https://github.com/kun-codes/python-3.12-ubuntu-18.04-docker
- Owner: kun-codes
- License: mit
- Created: 2025-06-28T03:30:39.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-06-28T05:19:08.000Z (6 months ago)
- Last Synced: 2025-06-28T06:18:18.701Z (6 months ago)
- Topics: docker, docker-image, dockerimage, python, python312, ubuntu, ubuntu1804, ubuntu1804-docker
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/kuncodes/python-3.12-ubuntu-18.04
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python 3.12 Ubuntu 18.04 Docker Image with Automated Patch Updates
[](https://hub.docker.com/r/kuncodes/python-3.12-ubuntu-18.04)
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](https://hub.docker.com/r/kuncodes/python-3.12-ubuntu-18.04)
Pull it directly with:
```sh
docker pull kuncodes/python-3.12-ubuntu-18.04
```
## Why This Image?
This image is designed for compiling Python binaries with [Nuitka](https://nuitka.net/) 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
```sh
docker build -t python:3.12-ubuntu18.04 .
```
### Run the Docker Image
```sh
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:
```sh
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.