Docker Poetry is a Docker image for Python projects with dependencies managed by Poetry.
At LOGIC our go-to stack for web applications is; the latest LTS Django on the latest Python using Poetry as our dependency manager in Docker. DRY is a core principle for us, so a public Docker image with the right Python and Poetry version is an exceptional base for new projects.
For the simplest use case just pick your Poetry version:
ghcr.io/withlogicco/poetry:<poetry_version>
This will use the default Python version (latest) and image variant (Bookworm). You can be more specific by picking either a Python version, image variant or both:
- Python version:
ghcr.io/withlogicco/poetry:<poetry_version>-python-<python_version>
- Image variant:
ghcr.io/withlogicco/poetry:<poetry_version>-<image_variant>
- Python version and image variant:
ghcr.io/withlogicco/poetry:<poetry_version>-python-<python_version>-<image_variant>
- Poetry 1.8.3:
ghcr.io/withlogicco/poetry:1.8.3
- Poetry 1.8.3 on Python 3.12:
ghcr.io/withlogicco/poetry:1.8.3-python-3.12
- Poetry 1.8.3 on Bookworm:
ghcr.io/withlogicco/poetry:1.8.3-bookworm
- Poetry 1.8.3 on Python 3.12 and Bookworm:
ghcr.io/withlogicco/poetry:1.8.3-python-3.12-bookworm
First, pick the image tag you wish to use. Then, copy your pyproject.toml
and poetry.lock
files in the working directory (/usr/src/app
), for optimal caching and run poetry install
. Example:
FROM ghcr.io/withlogicco/poetry:1.8.3
COPY pyproject.toml poetry.lock ./
RUN poetry install
COPY ./ ./
Only the latest version of Poetry is included in each build.
A build will be provided for each Python version still under maintenance and support. The latest Python version acts as the default in each build.
You can check the currently supported Python versions at https://endoflife.date/python.
We provide builds for three different image variants:
- Debian Bookworm (default):
bookworm
- Debian Slim:
slim
This project is MIT licensed.
🦄 Built with LOGIC. 🦄