aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2022-09-16 18:53:53 +0100
committerGravatar GitHub <[email protected]>2022-09-16 18:53:53 +0100
commit5b46ae8e5616df79961cd633563befbc4dc695d8 (patch)
tree57cfe3da85a3ddcd19e9e8acd0ec25b9ac7a38da
parentRemoved "redis_ready" from additional_spec_asyncs in MockBot (#2275) (diff)
parentMerge branch 'main' into ignore-mounted-project-venvs (diff)
Merge pull request #2276 from python-discord/ignore-mounted-project-venvs
-rw-r--r--Dockerfile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 9cf9c7b27..65ca8ce51 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,9 +3,13 @@ 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_HOME="/opt/poetry/home" \
+ POETRY_CACHE_DIR="/opt/poetry/cache" \
POETRY_NO_INTERACTION=1 \
+ POETRY_VIRTUALENVS_IN_PROJECT=false \
APP_DIR="/bot" \
GIT_SHA=$git_sha
@@ -21,7 +25,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 . .