From e8b4db81ea2481acfadbce7671262dcedef8e260 Mon Sep 17 00:00:00 2001 From: Dome Date: Fri, 17 Apr 2026 09:33:40 +0200 Subject: [PATCH] fix errors --- Dockerfile | 20 ++++++++------------ Dockerfile.BAK | 24 ------------------------ 2 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 Dockerfile.BAK diff --git a/Dockerfile b/Dockerfile index d793ba4..57540bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,24 @@ # Dockerfile FROM python:3.11-slim -# Arbeitsverzeichnis im Container +# Set working directory WORKDIR /app -# Abhängigkeiten kopieren und installieren -# Sicherstellen, dass requirements.txt im Repo existiert (Inhalt: requests) +# Copy and install requirements COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -# --- JETZT MIT UNTERSTRICH --- -# Kopiere das Skript aus deinem Repository in das Image -COPY gts_holmirdas.py . -# ----------------------------- - -# Datenverzeichnis für Persistenz (falls das Skript dort etwas speichert) +# Create data directory RUN mkdir -p /app/data -# Non-Root User für die Sicherheit +# Create non-root user RUN useradd -r -u 1000 holmirdas + +# Set ownership RUN chown -R holmirdas:holmirdas /app -# Wechsel zum User +# Switch to non-root user USER holmirdas -# Startbefehl (ebenfalls mit Unterstrich) +# Default command (will be overridden by docker-compose) CMD ["python", "gts_holmirdas.py"] diff --git a/Dockerfile.BAK b/Dockerfile.BAK deleted file mode 100644 index 57540bd..0000000 --- a/Dockerfile.BAK +++ /dev/null @@ -1,24 +0,0 @@ -# Dockerfile -FROM python:3.11-slim - -# Set working directory -WORKDIR /app - -# Copy and install requirements -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - -# Create data directory -RUN mkdir -p /app/data - -# Create non-root user -RUN useradd -r -u 1000 holmirdas - -# Set ownership -RUN chown -R holmirdas:holmirdas /app - -# Switch to non-root user -USER holmirdas - -# Default command (will be overridden by docker-compose) -CMD ["python", "gts_holmirdas.py"]