From da27cd0b1bd66fab942d4a02d7856812e08360f3 Mon Sep 17 00:00:00 2001 From: Antonis Kalipetis Date: Thu, 29 Sep 2022 14:01:05 +0300 Subject: [PATCH] Install poetry in its own virtualenv not to mess with libraries --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 812901d..cb6fc1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,10 @@ ARG SETUPTOOLS_VERSION=65.3.0 RUN pip install --upgrade pip==${PIP_VERSION} setuptools==${SETUPTOOLS_VERSION} ARG POETRY_VERSION=1.2.1 -RUN pip install poetry==${POETRY_VERSION} -RUN poetry config virtualenvs.create false +ENV POETRY_HOME=/opt/poetry\ + PATH="${PATH}:/opt/poetry/bin" +RUN python3 -m venv ${POETRY_HOME} &&\ + ${POETRY_HOME}/bin/pip install poetry==${POETRY_VERSION} &&\ + poetry config virtualenvs.create false WORKDIR /usr/src/app