Sfoglia il codice sorgente

Fix: APT change to China mirror

iaun 3 mesi fa
parent
commit
32bc2e0e60
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  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