aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile33
1 files changed, 16 insertions, 17 deletions
diff --git a/Dockerfile b/Dockerfile
index 8c4920a9..2bad6450 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,32 +1,31 @@
-FROM python:3.8-slim
+FROM python:3.9-slim
# Set pip to have cleaner logs and no saved cache
ENV PIP_NO_CACHE_DIR=false \
- PIPENV_HIDE_EMOJIS=1 \
- PIPENV_IGNORE_VIRTUALENVS=1 \
- PIPENV_NOSPIN=1
+ POETRY_VIRTUALENVS_CREATE=false
-# Install pipenv
-RUN pip install -U pipenv
+# Install Poetry and add it to the path
+RUN pip install --user poetry
+ENV PATH="${PATH}:/root/.local/bin"
-# Copy the project files into working directory
WORKDIR /bot
-# Copy dependency files
-COPY Pipfile Pipfile.lock ./
+# Copy dependencies and lockfile
+COPY pyproject.toml poetry.lock /bot/
-# Install project dependencies
-RUN pipenv install --deploy --system
+# Install dependencies and lockfile, excluding development
+# dependencies,
+RUN poetry install --no-dev --no-interaction --no-ansi
-# Copy project code
-COPY . .
-
-# Set Git SHA enviroment variable
+# Set SHA build argument
ARG git_sha="development"
ENV GIT_SHA=$git_sha
-ENTRYPOINT ["python"]
-CMD ["-m", "bot"]
+# Copy the rest of the project code
+COPY . .
+
+# Start the bot
+CMD ["python", "-m", "bot"]
# Define docker persistent volumes
VOLUME /bot/bot/log /bot/data