构建:Debian apt 源改用清华镜像 #459

Merged
chenxi merged 1 commits from fix/chenxi-debian-apt-mirror into main 2026-10-22 16:20:04 +08:00

View File

@ -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 \