From 9aece11ed3fde5c0d6b1e471b3e651a2de2d70ff Mon Sep 17 00:00:00 2001 From: brother7 <7brother7@gmail.com> Date: Thu, 23 Jul 2026 16:53:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ad6c521..b6c16e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,17 @@ FROM node:24-alpine AS build WORKDIR /app +ARG NPM_REGISTRY=https://registry.npmmirror.com + COPY package*.json ./ -RUN npm ci +RUN --mount=type=cache,target=/root/.npm \ + npm ci \ + --registry="${NPM_REGISTRY}" \ + --fetch-retries=5 \ + --fetch-retry-mintimeout=20000 \ + --fetch-retry-maxtimeout=120000 \ + --no-audit \ + --no-fund COPY . . RUN npm run build