Преглед изворни кода

fix(docker): 修正Debian 12 apt源文件路径

Debian 12 使用 DEB822 格式,源文件路径为
/etc/apt/sources.list.d/debian.sources 而非 /etc/apt/sources.list
WangXuMing пре 2 недеља
родитељ
комит
f5b9fe5030
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      Dockerfile

+ 3 - 3
Dockerfile

@@ -1,8 +1,8 @@
 FROM python:3.12-slim
 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
+# 替换为阿里云 apt 源(Debian 12 使用 DEB822 格式
+RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources && \
+    sed -i 's|security.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources
 
 
 # 安装 OpenCV 系统依赖及 LibreOffice(docx/doc 转 PDF)
 # 安装 OpenCV 系统依赖及 LibreOffice(docx/doc 转 PDF)
 RUN apt-get update && apt-get install -y \
 RUN apt-get update && apt-get install -y \