前端修饰与渲染处理
This commit is contained in:
@@ -3,12 +3,19 @@ FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
# Copy package files and npm config
|
||||
COPY client/package*.json ./client/
|
||||
COPY client/.npmrc ./client/
|
||||
COPY shared/package*.json ./shared/
|
||||
|
||||
# Install dependencies
|
||||
RUN cd client && npm ci
|
||||
# Install dependencies with multiple mirror fallback
|
||||
RUN cd client && \
|
||||
echo "Trying Aliyun mirror for frontend..." && \
|
||||
npm install --registry=https://registry.npmmirror.com --prefer-offline --no-audit --no-fund || \
|
||||
(echo "Aliyun failed, trying Tencent Cloud..." && \
|
||||
npm install --registry=https://mirrors.cloud.tencent.com/npm/ --prefer-offline --no-audit --no-fund) || \
|
||||
(echo "Tencent failed, trying Huawei Cloud..." && \
|
||||
npm install --registry=https://repo.huaweicloud.com/repository/npm/ --prefer-offline --no-audit --no-fund)
|
||||
|
||||
# Copy source code
|
||||
COPY client ./client
|
||||
|
||||
Reference in New Issue
Block a user