Skip to content

Commit 320628b

Browse files
committed
add poetry export plugin
1 parent 87aa386 commit 320628b

File tree

1 file changed

+5
-2
lines changed
  • 06-demo-application/load-generator-python

1 file changed

+5
-2
lines changed

06-demo-application/load-generator-python/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
FROM python:3.12-slim AS generate-requirements
22
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
33
RUN curl -sSL https://install.python-poetry.org | python3 -
4+
ENV PATH="/root/.local/bin:$PATH"
5+
# Export is provided by a plugin in newer versions of poetry
6+
RUN poetry self add "poetry-plugin-export[requirements]"
47
COPY pyproject.toml poetry.lock ./
5-
RUN /root/.local/bin/poetry export --output requirements.txt
8+
RUN poetry export --output requirements.txt
69

7-
###
10+
# ###
811

912
FROM python:3.12-slim AS production
1013
COPY --from=generate-requirements /requirements.txt .

0 commit comments

Comments
 (0)