aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2022-09-19 12:29:04 +0100
committerGravatar wookie184 <[email protected]>2022-09-19 12:29:04 +0100
commit3082dce9df16aaeb01e89f6b7b09dae54dd0ca93 (patch)
tree63a63806192a9ca3dc2cb49df1a2c994a2b90222 /Dockerfile
parentChange f-string to normal string (diff)
parentMerge pull request #2242 from python-discord/fix-not-awaited-coroutine-warning (diff)
Merge branch 'main' into update-autoreview-system
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile28
1 files changed, 8 insertions, 20 deletions
diff --git a/Dockerfile b/Dockerfile
index 30bf8a361..205b66209 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,28 +1,16 @@
-FROM --platform=linux/amd64 python:3.9-slim
+FROM --platform=linux/amd64 ghcr.io/chrislovering/python-poetry-base:3.10-slim
-# Set pip to have no saved cache
-ENV PIP_NO_CACHE_DIR=false \
- POETRY_VIRTUALENVS_CREATE=false
-
-
-# Install poetry
-RUN pip install -U poetry
-
-# Create the working directory
-WORKDIR /bot
+# Define Git SHA build argument for sentry
+ARG git_sha="development"
+ENV GIT_SHA=$git_sha
# Install project dependencies
+WORKDIR /bot
COPY pyproject.toml poetry.lock ./
-RUN poetry install --no-dev
-
-# Define Git SHA build argument
-ARG git_sha="development"
-
-# Set Git SHA environment variable for Sentry
-ENV GIT_SHA=$git_sha
+RUN poetry install --without dev
# Copy the source code in last to optimize rebuilding the image
COPY . .
-ENTRYPOINT ["python3"]
-CMD ["-m", "bot"]
+ENTRYPOINT ["poetry"]
+CMD ["run", "python", "-m", "bot"]