Skip to content

Commit

Permalink
Fix export stage
Browse files Browse the repository at this point in the history
Since `pipx` didn't end up on the `PATH` (`ensurepath` only seems to update `.bashrc`) we were actually using the latest version of `poetry`. Avoid `pipx` all-together, using this installation method described in the poetry documentation.
  • Loading branch information
gb-beng authored Jan 17, 2025
1 parent 49a4e4b commit db3ba9c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
FROM docker.io/python:3.11.10@sha256:b0c14c5ad67e76f603a72a165e89682b48898800b815e09f34c13ea87feb66d3 AS req

RUN python3 -m pip install pipx && \
python3 -m pipx ensurepath

RUN pipx install poetry==1.8.3 && \
pipx inject poetry poetry-plugin-export && \
pipx run poetry config warnings.export false
ENV POETRY_HOME=/opt/poetry
RUN <<EOF
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install poetry==1.8.3
EOF

COPY ./poetry.lock ./poetry.lock
COPY ./pyproject.toml ./pyproject.toml
RUN pipx run poetry export --format requirements.txt --output requirements.txt
RUN $POETRY_HOME/bin/poetry export --format requirements.txt --output requirements.txt

FROM docker.io/python:3.11.10@sha256:b0c14c5ad67e76f603a72a165e89682b48898800b815e09f34c13ea87feb66d3

Expand Down

0 comments on commit db3ba9c

Please sign in to comment.