aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-07-17 20:10:11 +0100
committerGravatar Joe Banks <[email protected]>2021-07-17 20:10:11 +0100
commitd3d81582cd7005df16fe3f5306e6afbed75bdb74 (patch)
tree323a7441f6c4d32833fee922208121497c77a9de /Dockerfile
Initial commit
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..cd86a33
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,26 @@
+FROM python:3.9-slim
+
+ENV PIP_NO_CACHE_DIR=false \
+ POETRY_VIRTUALENVS_CREATE=false
+
+# Install poetry
+RUN pip install -U poetry
+
+# Create the working directory
+WORKDIR /arthur
+
+# Install project dependencies
+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
+
+# Copy the source code in last to optimize rebuilding the image
+COPY . .
+
+ENTRYPOINT ["python3"]
+CMD ["-m", "arthur"]