chore: use npmmirror registry in Docker build
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
FROM node:20 AS base
|
||||
|
||||
# 设置华为云 npm 镜像
|
||||
RUN npm config set registry https://mirrors.huaweicloud.com/repository/npm/
|
||||
# 设置阿里系 npm 镜像
|
||||
RUN npm config set registry https://registry.npmmirror.com/
|
||||
|
||||
# --- Dependencies ---
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json bun.lock ./
|
||||
RUN npm install --registry=https://mirrors.huaweicloud.com/repository/npm/ --fetch-timeout=120000 --fetch-retries=5
|
||||
RUN npm install --registry=https://registry.npmmirror.com/ --fetch-timeout=120000 --fetch-retries=5
|
||||
|
||||
# --- Build ---
|
||||
FROM base AS builder
|
||||
|
||||
Reference in New Issue
Block a user