fix: 修改源

This commit is contained in:
sylarchen1389 2025-11-08 23:34:08 +08:00
parent 2dce0cbae5
commit 3d85268c90

View file

@ -32,16 +32,6 @@ ENV HTTP_PROXY=http://host.docker.internal:7897
ENV HTTPS_PROXY=http://host.docker.internal:7897
ENV NO_PROXY=localhost,127.0.0.1
# 增加 npm 超时时间
RUN npm config set fetch-timeout 600000 && \
npm config set fetch-retries 5 && \
npm config set fetch-retry-mintimeout 20000 && \
npm config set fetch-retry-maxtimeout 120000
# 配置 git 使用代理(某些包通过 git 下载)
RUN git config --global http.proxy http://host.docker.internal:7897 && \
git config --global https.proxy http://host.docker.internal:7897
# Set Node.js options (heap limit Allocation failed - JavaScript heap out of memory)
# ENV NODE_OPTIONS="--max-old-space-size=4096"
@ -52,7 +42,18 @@ WORKDIR /app
# to store git revision in build
RUN apk add --no-cache git
# 配置 git 使用代理(某些包通过 git 下载)
RUN git config --global http.proxy http://host.docker.internal:7897 && \
git config --global https.proxy http://host.docker.internal:7897
COPY package.json package-lock.json ./
# 增加 npm 超时时间
RUN npm config set fetch-timeout 600000 && \
npm config set fetch-retries 5 && \
npm config set fetch-retry-mintimeout 20000 && \
npm config set fetch-retry-maxtimeout 120000
# RUN npm ci --force
RUN npm install --legacy-peer-deps