增强开发部署构建配置
This commit is contained in:
+11
-1
@@ -2,8 +2,18 @@ FROM node:20-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ARG NPM_CONFIG_REGISTRY=https://registry.npmjs.org/
|
||||
ENV NPM_CONFIG_REGISTRY=$NPM_CONFIG_REGISTRY
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
RUN --mount=type=cache,target=/root/.npm \
|
||||
npm ci \
|
||||
--prefer-offline \
|
||||
--no-audit \
|
||||
--fetch-retries=5 \
|
||||
--fetch-retry-mintimeout=20000 \
|
||||
--fetch-retry-maxtimeout=120000 \
|
||||
--replace-registry-host=npmjs
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
Reference in New Issue
Block a user