fix errors

This commit is contained in:
2026-04-17 09:33:40 +02:00
parent 2107a43eaf
commit e8b4db81ea
2 changed files with 8 additions and 36 deletions
+8 -12
View File
@@ -1,28 +1,24 @@
# Dockerfile # Dockerfile
FROM python:3.11-slim FROM python:3.11-slim
# Arbeitsverzeichnis im Container # Set working directory
WORKDIR /app WORKDIR /app
# Abhängigkeiten kopieren und installieren # Copy and install requirements
# Sicherstellen, dass requirements.txt im Repo existiert (Inhalt: requests)
COPY requirements.txt . COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
# --- JETZT MIT UNTERSTRICH --- # Create data directory
# Kopiere das Skript aus deinem Repository in das Image
COPY gts_holmirdas.py .
# -----------------------------
# Datenverzeichnis für Persistenz (falls das Skript dort etwas speichert)
RUN mkdir -p /app/data RUN mkdir -p /app/data
# Non-Root User für die Sicherheit # Create non-root user
RUN useradd -r -u 1000 holmirdas RUN useradd -r -u 1000 holmirdas
# Set ownership
RUN chown -R holmirdas:holmirdas /app RUN chown -R holmirdas:holmirdas /app
# Wechsel zum User # Switch to non-root user
USER holmirdas USER holmirdas
# Startbefehl (ebenfalls mit Unterstrich) # Default command (will be overridden by docker-compose)
CMD ["python", "gts_holmirdas.py"] CMD ["python", "gts_holmirdas.py"]
-24
View File
@@ -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"]