From 22cbe5ec74bd00332d1523c8d2795f8993e068b1 Mon Sep 17 00:00:00 2001 From: chenxi Date: Thu, 22 Oct 2026 16:19:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=EF=BC=9ADebian=20apt=20?= =?UTF-8?q?=E6=BA=90=E6=94=B9=E7=94=A8=E6=B8=85=E5=8D=8E=E9=95=9C=E5=83=8F?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E4=BB=A3=E7=90=86=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=20deb.debian.org=20502=20=E5=AF=BC=E8=87=B4=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deploy/Dockerfile b/deploy/Dockerfile index ea3c3435..b5866c0c 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -1,5 +1,12 @@ FROM php:8.3.36-apache-bookworm@sha256:cbd3b3d9011668443d54ab40ec31db56c73d91b4c8198935d639aa80d2d815c1 AS php-base +# 国内构建机访问 deb.debian.org 常被代理拦截(502),统一改用清华 Debian 镜像。 +RUN set -eu; \ + for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.sources /etc/apt/sources.list.d/*.list; do \ + [ -f "$f" ] || continue; \ + sed -i 's|deb.debian.org|mirrors.tuna.tsinghua.edu.cn|g; s|security.debian.org|mirrors.tuna.tsinghua.edu.cn|g' "$f"; \ + done + RUN apt-get -o Acquire::Retries=3 update \ && apt-get -o Acquire::Retries=3 install -y --no-install-recommends \ curl \ -- 2.47.2