From 83061a442efbad2654c122a1a18503b302e32f73 Mon Sep 17 00:00:00 2001 From: Alisson Date: Fri, 8 Mar 2024 12:12:09 -0300 Subject: [PATCH] lock poetry version, remove poetry cache, use venv --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e3ea55..56f2a3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,16 @@ FROM python:3.10-slim WORKDIR /app -RUN pip install poetry +RUN pip install poetry==1.6.1 + +ENV POETRY_NO_INTERACTION=1 \ + POETRY_VIRTUALENVS_IN_PROJECT=1 \ + POETRY_VIRTUALENVS_CREATE=1 \ + POETRY_CACHE_DIR=/tmp/poetry_cache COPY pyproject.toml poetry.lock ./ -RUN poetry config virtualenvs.create false && \ - poetry install --no-dev +RUN poetry install --without dev && rm -rf $POETRY_CACHE_DIR RUN apt update && apt install libmagic1 -y RUN poetry add python-magic