更新 Dockerfile: 更换 Debian 源为阿里云,设置 pip 国内镜像为清华源,以优化依赖安装速度。

This commit is contained in:
2025-07-19 17:28:11 +08:00
parent 7c8ec75633
commit a14ad5ee48

View File

@ -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