From bb4610f49dc42c8e15b7494b599cb9c052ca012f Mon Sep 17 00:00:00 2001 From: Archicratia Date: Thu, 12 Feb 2026 11:20:27 +0100 Subject: [PATCH] Docker: enable BuildKit cache for npm ci --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 54e94d3..6a2f38f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,16 +7,18 @@ WORKDIR /app ENV npm_config_update_notifier=false \ npm_config_audit=false \ npm_config_fund=false \ - npm_config_progress=false + npm_config_progress=false \ + ASTRO_TELEMETRY_DISABLED=1 # (Optionnel mais propre) git + certificats RUN apt-get -o Acquire::Retries=5 -o Acquire::ForceIPv4=true update \ && apt-get install -y --no-install-recommends ca-certificates git \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* # Déps d’abord (cache Docker) COPY package.json package-lock.json ./ -RUN npm ci --no-audit --no-fund +RUN --mount=type=cache,target=/root/.npm \ + npm ci --no-audit --no-fund # Sources COPY . .