Build and Push Docker Image / build-and-push (push) Successful in 6m1s
- Ajout de la gestion du cache pour la construction de l'image Docker. - Correction de l'installation de Playwright pour utiliser uniquement chromium-headless-shell.
25 lines
619 B
Docker
25 lines
619 B
Docker
FROM python:3.11-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV USE_ENV=true
|
|
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Seulement chromium-headless-shell, pas le Chrome complet
|
|
RUN python -m playwright install --with-deps chromium-headless-shell
|
|
|
|
COPY . .
|
|
|
|
HEALTHCHECK --interval=1m --timeout=10s --start-period=30s --retries=3 \
|
|
CMD python healthcheck.py
|
|
|
|
CMD ["python", "main.py"] |