aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-03-10 18:56:26 +0000
committerGravatar Joe Banks <[email protected]>2021-03-10 18:56:26 +0000
commit57cfa3bfc09ed16ffadd06efeb1fe35f2bac35ae (patch)
tree6efd92078db5eb2d12ad5d17f73abfd54db3836f /Dockerfile
parentDisable poetry venv creation in Dockerfile and linting workflow (diff)
Annotate Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index f24f1eaa..f5cd75b7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,6 @@ FROM python:3.9-slim
# Set pip to have cleaner logs and no saved cache
ENV PIP_NO_CACHE_DIR=false \
- POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_CREATE=false
# Install git to be able to dowload git dependencies in the Pipfile
@@ -13,21 +12,27 @@ RUN apt-get -y update \
build-essential \
&& rm -rf /var/lib/apt/lists/*
+# Install Poetry and add it to the path
RUN pip install --user poetry
ENV PATH="${PATH}:/root/.local/bin"
WORKDIR /bot
+# Copy dependencies and lockfile
COPY pyproject.toml poetry.lock /bot/
+# Install dependencies and lockfile, excluding development
+# dependencies,
RUN poetry install --no-dev --no-interaction --no-ansi
# Set SHA build argument
ARG git_sha="development"
ENV GIT_SHA=$git_sha
+# Copy the rest of the project code
COPY . .
+# Start the bot
CMD ["python", "-m", "bot"]
# Define docker persistent volumes