chore(docker): 配置 yarn/npm 镜像与安装超时参数
All checks were successful
CI / ci (push) Successful in 1m25s

在 deps 阶段安装依赖前统一设置 registry.npmmirror.com 与较长网络超时,降低构建环境网络抖动导致的 yarn install 失败概率。

Made-with: Cursor
This commit is contained in:
2026-04-28 06:24:21 +08:00
parent 9383696026
commit 5b31a2bfb8

View File

@@ -7,6 +7,9 @@ FROM base AS deps
COPY package.json yarn.lock ./
COPY prisma ./prisma
ENV DATABASE_URL="postgresql://postgres:postgres@127.0.0.1:5432/postgres?schema=public"
RUN yarn config set registry https://registry.npmmirror.com \
&& npm config set registry https://registry.npmmirror.com \
&& yarn config set network-timeout 600000 -g
RUN yarn install --frozen-lockfile
FROM deps AS build