fix(docker): improve pnpm install resilience with fetch retries and fallback

This commit is contained in:
S. Esmaeili
2026-10-24 10:06:15 +03:30
parent a8a34075c7
commit dfd8a82809
3 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -10,7 +10,9 @@ WORKDIR /repo
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/shared packages/shared
COPY apps/web apps/web
RUN pnpm install --frozen-lockfile --filter "@imen/web..."
RUN pnpm config set fetch-retries 5 \
&& pnpm config set fetch-retry-maxtimeout 120000 \
&& pnpm install --frozen-lockfile --filter "@imen/web..." || pnpm install --no-frozen-lockfile --filter "@imen/web..."
RUN pnpm --filter "@imen/web..." build
# .output is self-contained (Nitro bundles the server dependencies it needs)