build: 构建时走国内 pip 镜像源(可用 build-arg 覆盖)

This commit is contained in:
houhuan committed 2026-11-16 12:46:03 +08:00
1 parent 4ee30399bf
commit 9ff4380a31
1 file changed
+5 -1
+5 -1
View File
@@ -17,8 +17,12 @@ RUN apt-get update \
WORKDIR /app
# 国内构建走镜像源;海外或企业内网可 --build-arg PIP_INDEX_URL=https://pypi.org/simple/
ARG PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
ARG PIP_TRUSTED_HOST=mirrors.aliyun.com
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -i "$PIP_INDEX_URL" --trusted-host "$PIP_TRUSTED_HOST" -r requirements.txt
COPY fengxiang ./fengxiang
COPY order_monitor.py fetch_orders.py push_latest_order.py healthcheck.py ./