From 4d5df2e8ab4b4f1987bad533dacd85292fa6bda9 Mon Sep 17 00:00:00 2001 From: apentori Date: Mon, 11 May 2026 15:41:52 +0200 Subject: [PATCH] Dockerfile: split dependency download layer requirements should be copy first to avoid downloading everytime excluding example config from docker Signed-off-by: apentori --- .dockerignore | 3 +++ Dockerfile | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 6aae033..256108d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,3 +9,6 @@ __pycache__/ # Status Bot uploads/ bot/docs + +config.yaml +.env diff --git a/Dockerfile b/Dockerfile index 61e2300..c406581 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ FROM python:3.12-slim WORKDIR /app -COPY . . +COPY requirements.txt . +COPY bot/requirements.txt bot/requirements.txt RUN pip install --no-cache-dir -r requirements.txt \ && if [ -f bot/requirements.txt ]; then pip install --no-cache-dir -r bot/requirements.txt; fi +COPY . . + ENTRYPOINT ["python", "monitor.py"] CMD []