增加构建缓存
Some checks failed
构建并运行 Docker / build (push) Failing after 23s

This commit is contained in:
2025-07-29 14:22:54 +08:00
parent 745360f93f
commit cfdc5e5d9a
4 changed files with 36 additions and 3 deletions

View File

@ -9,7 +9,9 @@ WORKDIR /app
# 安装依赖
COPY package.json ./
RUN npm install
# 使用 npm 缓存来加速构建
RUN npm config set cache /tmp/npm-cache && \
npm install --cache /tmp/npm-cache --prefer-offline --no-audit --no-fund
# 构建阶段
FROM base AS builder