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