From a14ad5ee481592d734e690a3fee49308c34ef965 Mon Sep 17 00:00:00 2001 From: niyyzf Date: Sat, 19 Jul 2025 17:28:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Dockerfile:=20=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2=20Debian=20=E6=BA=90=E4=B8=BA=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91=EF=BC=8C=E8=AE=BE=E7=BD=AE=20pip=20=E5=9B=BD=E5=86=85?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E4=B8=BA=E6=B8=85=E5=8D=8E=E6=BA=90=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E4=BC=98=E5=8C=96=E4=BE=9D=E8=B5=96=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E9=80=9F=E5=BA=A6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1ef0dfb..c3c6c64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ FROM python:3.11-slim +# 换 debian 源为阿里云 +RUN sed -i 's@http://deb.debian.org@http://mirrors.aliyun.com@g' /etc/apt/sources.list && \ + sed -i 's@http://security.debian.org@http://mirrors.aliyun.com@g' /etc/apt/sources.list + # 安装 Node.js 和 supervisord RUN apt-get update && \ apt-get install -y curl supervisor && \ @@ -7,6 +11,10 @@ RUN apt-get update && \ apt-get install -y nodejs && \ apt-get clean +# 设置 pip 国内镜像(清华) +RUN mkdir -p /root/.pip && \ + echo "[global]\nindex-url = https://pypi.tuna.tsinghua.edu.cn/simple\ntrusted-host = pypi.tuna.tsinghua.edu.cn" > /root/.pip/pip.conf + # 设置工作目录 WORKDIR /app