修改dockerfile

This commit is contained in:
2026-08-15 22:11:08 +08:00
parent af530a5fe3
commit 8cb8b5e463
2 changed files with 20 additions and 1 deletions

View File

@@ -2,8 +2,19 @@ FROM node:22-alpine AS deps
WORKDIR /app
ENV NEXT_TELEMETRY_DISABLED=1
# Use a free mainland-China npm mirror by default. CI can override this with
# --build-arg NPM_REGISTRY=https://registry.npmjs.org if its egress allows it.
ARG NPM_REGISTRY=https://registry.npmmirror.com
COPY package.json package-lock.json ./
RUN npm ci
RUN npm ci \
--registry="${NPM_REGISTRY}" \
--fetch-retries=5 \
--fetch-timeout=120000 \
--fetch-retry-mintimeout=10000 \
--fetch-retry-maxtimeout=60000 \
--no-audit \
--no-fund
FROM node:22-alpine AS builder
WORKDIR /app