From 91a05dc30dab1696fadacfdae5384fb7c5225ded Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thorsten=20Ro=C3=9Fner?= <thorsten.rossner.extern@zendis.de>
Date: Wed, 4 Sep 2024 09:29:45 +0200
Subject: [PATCH] fix: Use pip to install Python dependencies.

---
 Dockerfile       | 9 +++++----
 requirements.txt | 1 +
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index f85c672..11297e6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,9 +5,7 @@ FROM registry-1.docker.io/library/alpine:3.20.2
 
 RUN apk add --no-cache \
     python3=3.12.3-r2 \
-    py3-requests=2.32.3-r0 \
-    py3-pandas=2.0.3-r2 \
-    py3-configargparse=1.7-r1 \
+    py3-pip=24.0-r2 \
     bash=5.2.26-r0 \
   && addgroup -S "app" \
   && adduser -D -G "app" -h "/app" -s "/bin/bash" -u 1000 -S "app"
@@ -17,8 +15,11 @@ USER app
 WORKDIR /app
 
 COPY ./user_import_udm_rest_api.py /app/
+COPY ./requirements.txt /app/
+COPY ./template.ods /app/
 COPY lib /app/lib
 COPY data /app/data
-COPY ./template.ods /app/
+
+RUN pip install --no-cache-dir -r /app/requirements.txt
 
 CMD [ "/app/user_import_udm_rest_api.py"]
diff --git a/requirements.txt b/requirements.txt
index 1ebf18e..c5f42f3 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,7 @@
 # SPDX-FileCopyrightText: 2024 Zentrum für Digitale Souveränität der Öffentlichen Verwaltung (ZenDiS) GmbH
 # SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"
 # SPDX-License-Identifier: Apache-2.0
+odfpy
 requests
 pandas
 configargparse
-- 
GitLab