From 739b0ed96bb5e72d47730359f9a277a2402673b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kiss=20P=C3=A9ter?= <kiss.peter@linuxadm.hu>
Date: Tue, 11 Apr 2023 14:04:37 +0200
Subject: [PATCH] Improve Dockerfile: - Use smaller base image - Make it
 smaller by not saving cache (1,15GB -> 356MB)

---
 Dockerfile | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 146a37471..4d264c88c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,7 @@
-FROM python:3.11
-
+FROM python:3.11-slim
+ENV PIP_NO_CACHE_DIR=yes
 WORKDIR /app
-COPY scripts/ /app
-COPY requirements.txt /app
-
+COPY requirements.txt .
 RUN pip install -r requirements.txt
-
-CMD ["python", "main.py"]
+COPY scripts/ .
+ENTRYPOINT ["python", "main.py"]