Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ jobs:
strategy:
matrix:
python_version: ["3.13-bookworm", "3.13-slim", "3.12-bookworm", "3.12-slim", "3.11-bookworm", "3.11-slim"]
poetry_version: ["2.3.3", "2.2.1", "2.1.4", "2.0.1"]
poetry_version: ["2.4.1", "2.3.4", "2.2.1", "2.1.4"]
include:
- poetry_version: "2.3.3"
- poetry_version: "2.4.1"
python_version: "3.14-bookworm"
- poetry_version: "2.3.3"
- poetry_version: "2.4.1"
python_version: "3.14-slim"
- poetry_version: "2.3.4"
python_version: "3.14-bookworm"
- poetry_version: "2.3.4"
python_version: "3.14-slim"
- poetry_version: "2.2.1"
python_version: "3.14-bookworm"
Expand All @@ -37,10 +41,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Download poetry installer
run: |
Expand All @@ -50,7 +54,7 @@ jobs:
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# poetry-docker

[![2.3.3-py3.13-bookworm badge](https://img.shields.io/docker/v/biggates/poetry/2.3.3-py3.13-bookworm?label=biggates%2Fpoetry&logo=docker) ![2.3.3-py3.13-slim badge](https://img.shields.io/docker/v/biggates/poetry/2.3.3-py3.13-slim?label=biggates%2Fpoetry&logo=docker) ![2.3.3-py3.12-bookworm badge](https://img.shields.io/docker/v/biggates/poetry/2.3.3-py3.12-bookworm?label=biggates%2Fpoetry&logo=docker) ![2.3.3-py3.12-slim badge](https://img.shields.io/docker/v/biggates/poetry/2.3.3-py3.12-slim?label=biggates%2Fpoetry&logo=docker) ![2.3.3-py3.11-bookworm badge](https://img.shields.io/docker/v/biggates/poetry/2.3.3-py3.11-bookworm?label=biggates%2Fpoetry&logo=docker) ![2.3.3-py3.11-slim badge](https://img.shields.io/docker/v/biggates/poetry/2.3.3-py3.11-slim?label=biggates%2Fpoetry&logo=docker)](https://hub.docker.com/r/biggates/poetry) [![Docker Publish Badge](https://github.com/biggates/poetry-docker/actions/workflows/docker-publish.yml/badge.svg?branch=master)](https://github.com/biggates/poetry-docker/actions/workflows/docker-publish.yml)
[![2.4.1-py3.13-bookworm badge](https://img.shields.io/docker/v/biggates/poetry/2.4.1-py3.13-bookworm?label=biggates%2Fpoetry&logo=docker) ![2.4.1-py3.13-slim badge](https://img.shields.io/docker/v/biggates/poetry/2.4.1-py3.13-slim?label=biggates%2Fpoetry&logo=docker) ![2.4.1-py3.12-bookworm badge](https://img.shields.io/docker/v/biggates/poetry/2.4.1-py3.12-bookworm?label=biggates%2Fpoetry&logo=docker) ![2.4.1-py3.12-slim badge](https://img.shields.io/docker/v/biggates/poetry/2.4.1-py3.12-slim?label=biggates%2Fpoetry&logo=docker) ![2.4.1-py3.11-bookworm badge](https://img.shields.io/docker/v/biggates/poetry/2.4.1-py3.11-bookworm?label=biggates%2Fpoetry&logo=docker) ![2.4.1-py3.11-slim badge](https://img.shields.io/docker/v/biggates/poetry/2.4.1-py3.11-slim?label=biggates%2Fpoetry&logo=docker)](https://hub.docker.com/r/biggates/poetry) [![Docker Publish Badge](https://github.com/biggates/poetry-docker/actions/workflows/docker-publish.yml/badge.svg?branch=master)](https://github.com/biggates/poetry-docker/actions/workflows/docker-publish.yml)

a Docker image that includes [Poetry](https://python-poetry.org/) for CI/CD pipelines.

## Supported tags

- `2.3.3-py3.14-bookworm`
- `2.3.3-py3.14-slim`
- `2.3.3-py3.13-bookworm`
- `2.3.3-py3.13-slim`
- `2.3.3-py3.12-bookworm`
- `2.3.3-py3.12-slim`
- `2.3.3-py3.11-bookworm`
- `2.3.3-py3.11-slim`
- `2.4.1-py3.14-bookworm`
- `2.4.1-py3.14-slim`
- `2.4.1-py3.13-bookworm`
- `2.4.1-py3.13-slim`
- `2.4.1-py3.12-bookworm`
- `2.4.1-py3.12-slim`
- `2.4.1-py3.11-bookworm`
- `2.4.1-py3.11-slim`

See [versions.json](./versions.json) for further information.

Expand All @@ -22,8 +22,8 @@ See [versions.json](./versions.json) for further information.
In your pipeline / actions, replace docker image from `python` to `biggates/poetry`, for example:

```dockerfile
# FROM python:3.10-slim
FROM biggates/poetry:2.1.4-py3.10-slim
# FROM python:3.12-slim
FROM biggates/poetry:2.4.1-py3.12-slim
```

## details
Expand All @@ -40,7 +40,7 @@ A typical usage is use poetry to install all the dependencies in one stage, and

```dockerfile
# first stage
FROM biggates/poetry:2.1.4-py3.10-slim as venv-creator
FROM biggates/poetry:2.4.1-py3.12-slim as venv-creator

ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
Expand All @@ -56,7 +56,7 @@ ADD poetry.lock poetry.toml pyproject.toml README.md ./
RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install

# second stage
FROM python:3.10-slim as runtime
FROM python:3.12-slim as runtime

# activate the venv
ENV VIRTUAL_ENV=/app/.venv \
Expand Down
14 changes: 9 additions & 5 deletions scripts/update_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
WORKFLOW_AFTER = """
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Download poetry installer
run: |
Expand All @@ -47,7 +47,7 @@
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -72,9 +72,13 @@
python_version: $python_versions
poetry_version: $poetry_versions
include:
- poetry_version: "2.3.3"
- poetry_version: "2.4.1"
python_version: "3.14-bookworm"
- poetry_version: "2.3.3"
- poetry_version: "2.4.1"
python_version: "3.14-slim"
- poetry_version: "2.3.4"
python_version: "3.14-bookworm"
- poetry_version: "2.3.4"
python_version: "3.14-slim"
- poetry_version: "2.2.1"
python_version: "3.14-bookworm"
Expand Down
6 changes: 3 additions & 3 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"poetry": [
"2.3.3",
"2.4.1",
"2.3.4",
"2.2.1",
"2.1.4",
"2.0.1"
"2.1.4"
],
"python": [
"3.13-bookworm",
Expand Down