2024-12-28 23:46:13 +01:00
|
|
|
# Basis-Image (kann je nach Python-Version angepasst werden)
|
2024-12-29 01:39:45 +01:00
|
|
|
FROM python:3.13-alpine
|
2024-12-28 23:46:13 +01:00
|
|
|
|
|
|
|
# Arbeitsverzeichnis erstellen
|
|
|
|
WORKDIR /app
|
|
|
|
|
2024-12-29 01:39:45 +01:00
|
|
|
RUN apk update && apk add \
|
|
|
|
python3-dev \
|
|
|
|
gcc \
|
|
|
|
libc-dev
|
|
|
|
|
2024-12-28 23:46:13 +01:00
|
|
|
# Requirements in den Container kopieren
|
|
|
|
COPY requirements.txt requirements.txt
|
|
|
|
|
|
|
|
# Abhängigkeiten installieren
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
# Quellcode in den Container kopieren
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
# Flask Server starten
|
|
|
|
CMD ["python", "-u", "main.py"]
|