From a3f4cf86336872ae8b0be62554b796fb0ff3a18b Mon Sep 17 00:00:00 2001 From: Khalid Abdi Date: Sat, 13 Jun 2026 19:06:15 +0300 Subject: [PATCH] frontend: make Docker npm ci resilient to network drops The frontend dependency install (1000+ packages) failed in Docker with ECONNRESET / "network aborted" mid-stream. Add npm fetch retries and a long timeout so a transient registry drop is retried rather than failing the build. Co-Authored-By: Claude Opus 4.8 --- frontend/Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 72af667..ba4049f 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -2,7 +2,13 @@ FROM node:22-alpine AS deps WORKDIR /app COPY package*.json ./ -RUN npm ci +# Retry on transient registry drops (ECONNRESET / "network aborted") and allow a +# long timeout — the dependency set is large, so a slow connection can stall. +RUN npm ci --no-audit --no-fund \ + --fetch-retries=5 \ + --fetch-retry-mintimeout=20000 \ + --fetch-retry-maxtimeout=180000 \ + --fetch-timeout=900000 # --- build (Next.js standalone output) ------------------------------------- FROM node:22-alpine AS build