الملفات
ghaymah-exam-amirkasseb-sre/q5-mithal-monitor/Dockerfile
2026-07-26 19:57:48 +03:00

26 أسطر
663 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Install system dependencies if required
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install Python requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY monitor.py index.html entrypoint.sh ./
COPY data.jsonl data.csv monitoring_data.csv ./
# Create symlink so dashboard.html also works without code duplication
RUN ln -sf index.html dashboard.html && chmod +x entrypoint.sh
# Expose HTTP dashboard port
EXPOSE 8080
# Run entrypoint script
ENTRYPOINT ["/app/entrypoint.sh"]