forked from langgenius/dify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: speed up the Docker build for dify-api for Chinese developers. (l…
- Loading branch information
Showing
1 changed file
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,10 @@ WORKDIR /app/api | |
|
||
# Install Poetry | ||
ENV POETRY_VERSION=1.8.3 | ||
|
||
# if you located in China, you can use aliyun mirror to speed up | ||
# RUN pip install --no-cache-dir poetry==${POETRY_VERSION} -i https://mirrors.aliyun.com/pypi/simple/ | ||
|
||
RUN pip install --no-cache-dir poetry==${POETRY_VERSION} | ||
|
||
# Configure Poetry | ||
|
@@ -16,6 +20,9 @@ ENV POETRY_REQUESTS_TIMEOUT=15 | |
|
||
FROM base AS packages | ||
|
||
# if you located in China, you can use aliyun mirror to speed up | ||
# RUN sed -i '[email protected]@mirrors.aliyun.com@g' /etc/apt/sources.list.d/debian.sources | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends gcc g++ libc-dev libffi-dev libgmp-dev libmpfr-dev libmpc-dev | ||
|
||
|
@@ -43,6 +50,8 @@ WORKDIR /app/api | |
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev \ | ||
# if you located in China, you can use aliyun mirror to speed up | ||
# && echo "deb http://mirrors.aliyun.com/debian testing main" > /etc/apt/sources.list \ | ||
&& echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list \ | ||
&& apt-get update \ | ||
# For Security | ||
|