mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
fix: 修改源
This commit is contained in:
parent
2dce0cbae5
commit
3d85268c90
1 changed files with 11 additions and 10 deletions
21
Dockerfile
21
Dockerfile
|
|
@ -32,16 +32,6 @@ ENV HTTP_PROXY=http://host.docker.internal:7897
|
||||||
ENV HTTPS_PROXY=http://host.docker.internal:7897
|
ENV HTTPS_PROXY=http://host.docker.internal:7897
|
||||||
ENV NO_PROXY=localhost,127.0.0.1
|
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)
|
# Set Node.js options (heap limit Allocation failed - JavaScript heap out of memory)
|
||||||
# ENV NODE_OPTIONS="--max-old-space-size=4096"
|
# ENV NODE_OPTIONS="--max-old-space-size=4096"
|
||||||
|
|
||||||
|
|
@ -52,7 +42,18 @@ WORKDIR /app
|
||||||
# to store git revision in build
|
# to store git revision in build
|
||||||
RUN apk add --no-cache git
|
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 ./
|
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 ci --force
|
||||||
RUN npm install --legacy-peer-deps
|
RUN npm install --legacy-peer-deps
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue