更新 Dockerfile: 更换 Debian 源为阿里云,设置 pip 国内镜像为清华源,以优化依赖安装速度。
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user