diff --git a/README.md b/README.md index 4c3d000..6fca98d 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ This multiarch image supports AMD64 and ARM64 architectures. * v3.11 **Operating system:** -* [Debian Bullseye v10.13](https://www.debian.org/releases/bullseye/) -* [Debian Bullseye slim v10.13](https://www.debian.org/releases/bullseye/) +* [Debian Bookworm v12.1](https://www.debian.org/releases/bookworm/) +* [Debian Bookworm slim v12.1](https://www.debian.org/releases/bookworm/) **CPU architectures** * linux/amd64 -* linux/arm64 +* linux/arm64/v8 diff --git a/build/Dockerfile b/build/Dockerfile index cfa3289..0eae7ff 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,7 +1,7 @@ # References: using official Python images # https://hub.docker.com/_/python ARG OFFICIAL_PYTHON_IMAGE -FROM ${OFFICIAL_PYTHON_IMAGE} +FROM ${OFFICIAL_PYTHON_IMAGE} as build-stage ARG POETRY_VERSION LABEL maintainer="Max Pfeiffer " @@ -21,14 +21,17 @@ ENV PIP_NO_CACHE_DIR=off \ POETRY_VERSION=${POETRY_VERSION} \ POETRY_HOME="/opt/poetry" -ENV PATH="$POETRY_HOME/bin:$PATH" - -# https://python-poetry.org/docs/#osx--linux--bashonwindows-install-instructions RUN apt-get update \ && apt-get install --no-install-recommends -y \ - build-essential \ - curl \ - && curl -sSL https://install.python-poetry.org | python - \ - && apt-get purge --auto-remove -y \ - build-essential \ - curl + build-essential + +# https://python-poetry.org/docs/#installing-manually +RUN python -m venv ${POETRY_HOME} +RUN ${POETRY_HOME}/bin/pip install -U pip setuptools +RUN ${POETRY_HOME}/bin/pip install "poetry==${POETRY_VERSION}" + +FROM ${OFFICIAL_PYTHON_IMAGE} as production-image + +ENV PATH="/opt/poetry/bin:$PATH" + +COPY --from=build-stage /opt/poetry /opt/poetry/ diff --git a/build/docker-bake.hcl b/build/docker-bake.hcl index 9a32ffa..c9cf03f 100644 --- a/build/docker-bake.hcl +++ b/build/docker-bake.hcl @@ -13,10 +13,11 @@ variable "CONTEXT" { target "python-poetry" { name = "poetry${replace(poetry_version, ".", "-")}-python${replace(python_version, ".", "-")}-${os_variant}" context = CONTEXT + target = "production-image" matrix = { python_version = ["3.9.17", "3.10.12", "3.11.4"] - os_variant = ["bullseye", "slim-bullseye"] + os_variant = ["bookworm", "slim-bookworm"] poetry_version = ["1.3.2", "1.4.2", "1.5.1"] }