-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-dsfr
More file actions
36 lines (29 loc) · 1.08 KB
/
Dockerfile-dsfr
File metadata and controls
36 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Dockerfile DSFR - Environnement local identique à CI
# Python 3.11 pour compatibilité dsfr-structure >=0.7.0
# Date: 2025-10-28 - Fix hot-reload macOS avec polling
FROM python:3.11-slim
WORKDIR /docs
# Installer dépendances système (git + WeasyPrint libs + compilateurs)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
gcc \
g++ \
libpango-1.0-0 \
libpangoft2-1.0-0 \
libpangocairo-1.0-0 \
libcairo2 \
libffi-dev \
libgdk-pixbuf-2.0-0 \
libharfbuzz-dev \
shared-mime-info && \
rm -rf /var/lib/apt/lists/*
# Installer dépendances Python DSFR
COPY requirements-dsfr.txt .
RUN pip install --no-cache-dir -r requirements-dsfr.txt
# Copier script wrapper pour hot-reload macOS (force polling)
COPY scripts/mkdocs-serve-polling.py /usr/local/bin/mkdocs-polling
RUN chmod +x /usr/local/bin/mkdocs-polling
EXPOSE 8000
# Lancer serveur DSFR avec wrapper polling (hot reload macOS)
CMD ["python3", "/usr/local/bin/mkdocs-polling", "serve", "--config-file", "mkdocs-dsfr.yml", "--dev-addr=0.0.0.0:8000"]