Add docker definitions

This commit is contained in:
2022-07-28 19:21:08 +01:00
parent 15583bdaab
commit 2b4e037b51
4 changed files with 55 additions and 0 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
# syntax=docker/dockerfile:1
FROM python:3
RUN useradd -d /code pathogen
RUN mkdir /code
RUN chown pathogen:pathogen /code
RUN mkdir /venv
RUN chown pathogen:pathogen /venv
USER pathogen
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.txt /code/
RUN python -m venv /venv
RUN . /venv/bin/activate && pip install -r requirements.txt
CMD . /venv/bin/activate && exec python /code/threshold