From 552bdddbbab80fb5ea73d288a4cb7d1d22fb0b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiss=20Gy=C3=B6rgy?= Date: Fri, 3 Jul 2020 04:12:36 +0200 Subject: [PATCH] Dockerfile --- .dockerignore | 2 ++ Dockerfile | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..194ce7d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git/ +build/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2c43ddf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.8-slim + +RUN useradd --home-dir /app cfdns +WORKDIR /app +RUN chown cfdns /app +USER cfdns + +ENV POETRY_VIRTUALENVS_CREATE=false +ENV PATH=$PATH:/app/.local/bin + +RUN pip install --no-cache-dir poetry + +COPY pyproject.toml poetry.lock /app/ +RUN poetry install --no-dev + +COPY cfdns.py /app/ + +ENTRYPOINT ["python", "cfdns.py"]