26 lines
633 B
Docker
26 lines
633 B
Docker
# Dockerfile für TI-Status2Mattermost
|
|
FROM python:3.11-slim
|
|
|
|
# Arbeitsverzeichnis setzen
|
|
WORKDIR /app
|
|
|
|
# System-Abhängigkeiten installieren
|
|
RUN apt-get update && apt-get install -y \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Python-Abhängigkeiten kopieren und installieren
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Anwendungsdateien kopieren
|
|
COPY ti_status_checker.py .
|
|
COPY ti_statistics.py .
|
|
|
|
# Nicht-root Benutzer erstellen
|
|
RUN useradd --create-home --shell /bin/bash appuser && \
|
|
chown -R appuser:appuser /app
|
|
USER appuser
|
|
|
|
# Standardbefehl
|
|
CMD ["python", "ti_status_checker.py"] |