From 381884371e15878b6bfde72ba6e8bcdc83e4bb49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Mon, 2 Jan 2023 18:11:43 +0100 Subject: [PATCH] Add Dockerfile --- Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1b2887f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.10-slim-bullseye +RUN apt update && apt install --no-install-recommends --yes git +ENV VIRTUAL_ENV=/opt/venv +RUN python3 -m venv pip $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" +RUN pip install --no-cache-dir poetry +RUN useradd --create-home --uid 1000 timetracker +RUN git clone https://git.kucharczyk.xyz/lukas/timetracker.git /home/timetracker/app +WORKDIR /home/timetracker/app +RUN poetry install +USER timetracker +EXPOSE 8000 +CMD [ "python3", "src/web/manage.py", "runserver" ] \ No newline at end of file