Parcourir la source

Fix: APT change to China mirror

iaun il y a 3 mois
Parent
commit
32bc2e0e60
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      Dockerfile

+ 4 - 0
Dockerfile

@@ -11,6 +11,10 @@ FROM python:3.11-slim AS backend
 
 WORKDIR /app
 
+# Use Tsinghua mirror for apt (HTTPS)
+RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list.d/debian.sources \
+    && sed -i 's/http:/https:/g' /etc/apt/sources.list.d/debian.sources
+
 # Set timezone to Asia/Shanghai
 ENV TZ=Asia/Shanghai
 RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone