From ce1f1d8db5eead1c3e1dbeb2a02c56936708cef1 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 22 Aug 2025 22:39:48 +0100 Subject: [PATCH] Fix the PHP 7.2 build on Debian 10. --- images/7.2/php/Dockerfile | 4 ++++ update.php | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/images/7.2/php/Dockerfile b/images/7.2/php/Dockerfile index d9c961d..f39b1f8 100644 --- a/images/7.2/php/Dockerfile +++ b/images/7.2/php/Dockerfile @@ -14,6 +14,10 @@ ENV COMPOSER_HOME /tmp # install the PHP extensions we need RUN set -ex; \ + \ + sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \ + sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list; \ + sed -i '/buster-updates/d' /etc/apt/sources.list; \ \ apt-get update; \ \ diff --git a/update.php b/update.php index 05da23d..90f92e3 100644 --- a/update.php +++ b/update.php @@ -392,6 +392,12 @@ if ( $version == '7.0' ) { $install_extensions .= "echo 'deb http://archive.debian.org/debian stretch main contrib non-free' | tee /etc/apt/sources.list; \\\n\t\\\n\t"; } + // Debian 10/buster was moved to archive.debian.org in March 2024. See https://lists.debian.org/debian-devel-announce/2024/03/msg00003.html. + if ( $version == '7.2' ) { + $install_extensions .= "sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \\\n\t"; + $install_extensions .= "sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list; \\\n\t"; + $install_extensions .= "sed -i '/buster-updates/d' /etc/apt/sources.list; \\\n\t\\\n\t"; + } $install_extensions .= "apt-get update; \\\n\t\\\n\tapt-get install -y --no-install-recommends " . implode( ' ', $config['apt'] ) . ";";