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