Sign inSign up

indigopaas/poetry

By indigopaas

•Updated 10 months ago

Image
0

1.1K

indigopaas/poetry repository overview

⁠poetry-docker

Docker Image, based on python, with poetry.

This image:

  • Is based on python3 image (python version and variant can be chose)
  • Uses latest version of pip and setuptools
  • Installs poetry (poetry version can be chosen)
  • Create a non-root user with sudoers privileges (when using this image as base, the current user is still root)

The following arguments can be passed at build time to configure the image:

  • PYTHON_VERSION (default is 3.13)
  • PYTHON_VARIANT (default is slim)
  • POETRY_VERSION (default is 2.1.4)
  • USERNAME (default is userapp)
  • USER_UID (default is 1000)
  • USER_GID (default is $USER_UID)

⁠Usage example

Here a Dockerfile example using this image.

ARG PYTHON_VERSION=3.12
ARG POETRY_VERSION=2.1

FROM indigopaas/poetry:${POETRY_VERSION}-python${PYTHON_VERSION}

WORKDIR /app

# Copy and install files as root user
COPY ./pyproject.toml ./poetry.lock ./README.md /app/

RUN poetry install

# Set user as non-root user
USER ${USERNAME}

Tag summary

Content type

Image

Digest

sha256:5943321da…

Size

103.5 MB

Last updated

10 months ago

docker pull indigopaas/poetry