The most lightweight Python 3 Docker image possible.
https://github.com/CrafterKolyan/tiny-python-docker-image/actions/workflows/update-repository.yml/badge.svg?branch=main| Dockerfile | Description | Size | Version |
|---|---|---|---|
| Dockerfile.scratch-minimal | Minimal Python image with almost no libraries from scratch | 6.587 MB | 3.14.5 |
| Dockerfile.scratch-full | Smallest Python image with default libraries from scratch | 23.38 MB | 3.14.5 |
| Dockerfile.haizaar-minimal | Stripped official Python image (haizaar/python-minimal) | 37.6 MB | 3.14.6 |
| Dockerfile.alpine | Alpine-based | 49.65 MB | 3.14.5 |
| Dockerfile.python-alpine | Python Alpine-based Official | 53.99 MB | 3.14.6 |
| Dockerfile.python-slim | Minimal packages needed to run python | 119.3 MB | 3.14.6 |
| Dockerfile.ubuntu | Ubuntu-based | 141.6 MB | 3.14.4 |
| Dockerfile.python | Python Debian-based Official with a lot of packages | 1117 MB | 3.14.6 |
- Docker
docker build -t python-tiny . -f <Dockerfile name>
For example:
docker build -t python-tiny . -f Dockerfile.scratch-fulldocker run --rm -it python-tiny
- Docker
ldd(prints the shared libraries required by each program or shared library specified on the command line): used to createscratch-fullandscratch-minimalimages.