aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 9cf9c7b27..da65bbf3b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,9 +3,12 @@ FROM --platform=linux/amd64 python:3.10-slim
# Define Git SHA build argument for sentry
ARG git_sha="development"
+# POETRY_VIRTUALENVS_IN_PROJECT is required to ensure in-projects venvs mounted from the host in dev
+# don't get prioritised by `poetry run`
ENV POETRY_VERSION=1.2.0 \
POETRY_HOME="/opt/poetry" \
POETRY_NO_INTERACTION=1 \
+ POETRY_VIRTUALENVS_IN_PROJECT=false \
APP_DIR="/bot" \
GIT_SHA=$git_sha
@@ -21,7 +24,7 @@ RUN curl -sSL https://install.python-poetry.org | python
# Install project dependencies
WORKDIR $APP_DIR
COPY pyproject.toml poetry.lock ./
-RUN poetry install --no-dev
+RUN poetry install --without dev
# Copy the source code in last to optimize rebuilding the image
COPY . .