update dockerfile
This commit is contained in:
+8
-2
@@ -5,9 +5,15 @@ FROM python:3.11-slim
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy and install requirements
|
# Copy and install requirements
|
||||||
|
# Stelle sicher, dass eine requirements.txt in deinem Repo liegt (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 ---
|
||||||
|
# Kopiere das Skript aus deinem Repository in das Image
|
||||||
|
COPY gts-holmirdas.py .
|
||||||
|
# -------------------------------
|
||||||
|
|
||||||
# Create data directory
|
# Create data directory
|
||||||
RUN mkdir -p /app/data
|
RUN mkdir -p /app/data
|
||||||
|
|
||||||
@@ -20,5 +26,5 @@ RUN chown -R holmirdas:holmirdas /app
|
|||||||
# Switch to non-root user
|
# Switch to non-root user
|
||||||
USER holmirdas
|
USER holmirdas
|
||||||
|
|
||||||
# Default command (will be overridden by docker-compose)
|
# Default command - ACHTUNG: Bindestrich statt Unterstrich!
|
||||||
CMD ["python", "gts_holmirdas.py"]
|
CMD ["python", "gts-holmirdas.py"]
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# 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"]
|
||||||
Reference in New Issue
Block a user