Ver código fonte

chore(docker): 添加阿里云apt镜像源加速依赖下载

WangXuMing 2 semanas atrás
pai
commit
a874b3977f
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      Dockerfile

+ 4 - 0
Dockerfile

@@ -1,5 +1,9 @@
 FROM python:3.12-slim
 
+# 替换为阿里云 apt 源(解决下载失败)
+RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list && \
+    sed -i 's|security.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list
+
 # 安装 OpenCV 系统依赖及 LibreOffice(docx/doc 转 PDF)
 RUN apt-get update && apt-get install -y \
     # OpenCV 核心依赖