From 5b31a2bfb838aa3d809aa5296d16934b5cfab965 Mon Sep 17 00:00:00 2001 From: alboped Date: Tue, 28 Apr 2026 06:24:21 +0800 Subject: [PATCH] =?UTF-8?q?chore(docker):=20=E9=85=8D=E7=BD=AE=20yarn/npm?= =?UTF-8?q?=20=E9=95=9C=E5=83=8F=E4=B8=8E=E5=AE=89=E8=A3=85=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 deps 阶段安装依赖前统一设置 registry.npmmirror.com 与较长网络超时,降低构建环境网络抖动导致的 yarn install 失败概率。 Made-with: Cursor --- deploy/docker/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deploy/docker/Dockerfile b/deploy/docker/Dockerfile index 4b6d5bc..70bdeda 100644 --- a/deploy/docker/Dockerfile +++ b/deploy/docker/Dockerfile @@ -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