Skip to content

Commit

Permalink
lock poetry version, remove poetry cache, use venv
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisoSouza committed Mar 8, 2024
1 parent bc29ee8 commit 83061a4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 83061a4

Please sign in to comment.