Forráskód Böngészése

修改基础镜像构建

zhy 1 hete
szülő
commit
04ec2c75e1
1 módosított fájl, 5 hozzáadás és 15 törlés
  1. 5 15
      docker/Dockerfile-gl

+ 5 - 15
docker/Dockerfile-gl

@@ -1,18 +1,8 @@
-# 1. 基于官方 Python 3.12 slim
 FROM python:3.12-slim
 
-# 2. 使用中科大 Debian Bookworm 镜像源
-RUN printf "deb https://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware\n\
-deb https://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware\n\
-deb https://mirrors.ustc.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware\n" \
-> /etc/apt/sources.list
+ENV http_proxy=http://192.168.0.50:7890
+ENV https_proxy=http://192.168.0.50:7890
 
-# 3. 安装推理时常用运行库;4. 最后清理缓存减小镜像
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends \
-        libglib2.0-0 \
-        libgl1 && \
-    rm -rf /var/lib/apt/lists/*
-
-# 5. 默认命令,仅测试镜像;业务镜像里可覆盖
-CMD ["python", "--version"]
+# 先临时关闭校验,安装必要工具
+RUN apt-get update -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowUnsigned=true && \
+    apt-get install -y --no-install-recommends --allow-unauthenticated libglib2.0-0 libgl1 && rm -rf /var/lib/apt/lists/*