Update Dockerfile
This commit is contained in:
+11
-13
@@ -1,30 +1,28 @@
|
|||||||
# Dockerfile
|
# Dockerfile
|
||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
# Set working directory
|
# Arbeitsverzeichnis im Container
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy and install requirements
|
# Abhängigkeiten kopieren und installieren
|
||||||
# Stelle sicher, dass eine requirements.txt in deinem Repo liegt (Inhalt: requests)
|
# 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
|
||||||
|
|
||||||
# --- DIESER TEIL HAT GEFEHLT ---
|
# --- JETZT MIT UNTERSTRICH ---
|
||||||
# Kopiere das Skript aus deinem Repository in das Image
|
# Kopiere das Skript aus deinem Repository in das Image
|
||||||
COPY gts-holmirdas.py .
|
COPY gts_holmirdas.py .
|
||||||
# -------------------------------
|
# -----------------------------
|
||||||
|
|
||||||
# Create data directory
|
# Datenverzeichnis für Persistenz (falls das Skript dort etwas speichert)
|
||||||
RUN mkdir -p /app/data
|
RUN mkdir -p /app/data
|
||||||
|
|
||||||
# Create non-root user
|
# Non-Root User für die Sicherheit
|
||||||
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
|
||||||
|
|
||||||
# Switch to non-root user
|
# Wechsel zum User
|
||||||
USER holmirdas
|
USER holmirdas
|
||||||
|
|
||||||
# Default command - ACHTUNG: Bindestrich statt Unterstrich!
|
# Startbefehl (ebenfalls mit Unterstrich)
|
||||||
CMD ["python", "gts-holmirdas.py"]
|
CMD ["python", "gts_holmirdas.py"]
|
||||||
|
|||||||
Reference in New Issue
Block a user