From b393997b0dc102176f61f99316d6f0aabb891249 Mon Sep 17 00:00:00 2001 From: jeremygan2021 Date: Fri, 9 Jan 2026 23:41:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E5=86=85=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8a5da61..c7766ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,12 @@ -# 使用官方 Python 3.9 slim 镜像作为基础镜像 -FROM python:3.9-slim +# 使用国内镜像源(DaoCloud 公益镜像)作为基础镜像 +FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.9-slim # 设置工作目录 WORKDIR /app +# 设置 pip 国内镜像源(清华源) +RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple + # 设置环境变量 # 防止 Python 生成 .pyc 文件 ENV PYTHONDONTWRITEBYTECODE=1