在 deps 阶段安装依赖前统一设置 registry.npmmirror.com 与较长网络超时,降低构建环境网络抖动导致的 yarn install 失败概率。 Made-with: Cursor
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user