Skip to content

Commit

Permalink
Merge pull request #18 from hostwithquantum/set-poetry-version
Browse files Browse the repository at this point in the history
Update: image
  • Loading branch information
till authored Nov 25, 2023
2 parents d4c37a0 + 1f74c6a commit 4e5e8c3
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@ FROM python:3.11.4-slim-buster

LABEL org.opencontainers.image.description "Docker (base) image with Python 3.x with poetry"

ARG POETRY_VERSION=1.2.0
ARG POETRY_HOME=/opt/poetry

# making this explicit
USER root
ENV POETRY_CMD=/root/.local/bin/poetry

RUN apt-get update -y \
ADD https://install.python-poetry.org /tmp/install-poetry

RUN apt update -y \
&& apt install \
--no-install-recommends -y \
build-essential \
jq \
&& pip install --user poetry \
&& rm -rf /root/.cache/pip \
&& POETRY_VERSION=${POETRY_VERSION} python3 /tmp/install-poetry \
&& rm /tmp/install-poetry \
&& ln -s ${POETRY_HOME}/bin/poetry /usr/local/bin/poetry \
&& mkdir -p /workspace

WORKDIR /workspace

ENTRYPOINT ["/usr/local/bin/poetry"]

0 comments on commit 4e5e8c3

Please sign in to comment.