22 lines
495 B
Docker
22 lines
495 B
Docker
FROM python:3.11-slim
|
|
|
|
# Arbeitsverzeichnis
|
|
WORKDIR /app
|
|
|
|
# Git installieren
|
|
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Repository klonen
|
|
ARG REPO_URL
|
|
RUN git clone ${REPO_URL} /app
|
|
|
|
# Abhängigkeiten installieren (falls requirements.txt existiert)
|
|
RUN pip install --no-cache-dir -r requirements.txt || true
|
|
|
|
# Entrypoint-Skript für git pull beim Start
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 5000
|
|
ENTRYPOINT ["/entrypoint.sh"]
|