File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,25 @@ ARG PYTHON_VER=3.11
22
33FROM python:${PYTHON_VER}-slim
44
5- RUN which poetry || curl -sSL https://install.python-poetry.org | python3 - && \
6- poetry config virtualenvs.create false
5+ # Install Poetry manually via its installer script;
6+ # if we instead used "pip install poetry" it would install its own dependencies globally which may conflict with ours.
7+ # https://python-poetry.org/docs/master/#installing-with-the-official-installer
8+ # This also makes it so that Poetry will *not* be included in the "final" image since it's not installed to /usr/local/
9+ ARG POETRY_HOME=/opt/poetry
10+ ARG POETRY_INSTALLER_PARALLEL=true
11+ ARG POETRY_VERSION=1.8.2
12+ ARG POETRY_VIRTUALENVS_CREATE=false
13+ ADD https://install.python-poetry.org /tmp/install-poetry.py
14+ RUN python /tmp/install-poetry.py
15+
16+ # Add poetry install location to the $PATH
17+ ENV PATH="${POETRY_HOME}/bin:${PATH}"
18+
19+ RUN poetry config virtualenvs.create ${POETRY_VIRTUALENVS_CREATE} && \
20+ poetry config installer.parallel "${POETRY_INSTALLER_PARALLEL}"
721
822WORKDIR /local
923COPY . /local
1024
1125# Install the app
12- RUN poetry install --extras all -- with dev
26+ RUN poetry install --with dev
You can’t perform that action at this time.
0 commit comments