ci: 添加国内镜像代理和 BuildKit 缓存优化构建速度

This commit is contained in:
hhs
2026-06-14 15:14:28 +08:00
parent ffcb11625a
commit cb0c747133
3 changed files with 8 additions and 1 deletions

View File

@@ -3,6 +3,9 @@ FROM node:22-alpine AS builder
WORKDIR /app
# 使用国内 npm 镜像
RUN npm config set registry https://registry.npmmirror.com
# 先复制依赖清单,利用 Docker 缓存层
COPY package.json package-lock.json ./
RUN npm ci