Skip to content

Commit ce1f1d8

Browse files
committed
Fix the PHP 7.2 build on Debian 10.
1 parent d4515b9 commit ce1f1d8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

images/7.2/php/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ ENV COMPOSER_HOME /tmp
1414

1515
# install the PHP extensions we need
1616
RUN set -ex; \
17+
\
18+
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \
19+
sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list; \
20+
sed -i '/buster-updates/d' /etc/apt/sources.list; \
1721
\
1822
apt-get update; \
1923
\

update.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,12 @@
392392
if ( $version == '7.0' ) {
393393
$install_extensions .= "echo 'deb http://archive.debian.org/debian stretch main contrib non-free' | tee /etc/apt/sources.list; \\\n\t\\\n\t";
394394
}
395+
// Debian 10/buster was moved to archive.debian.org in March 2024. See https://lists.debian.org/debian-devel-announce/2024/03/msg00003.html.
396+
if ( $version == '7.2' ) {
397+
$install_extensions .= "sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \\\n\t";
398+
$install_extensions .= "sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list; \\\n\t";
399+
$install_extensions .= "sed -i '/buster-updates/d' /etc/apt/sources.list; \\\n\t\\\n\t";
400+
}
395401

396402
$install_extensions .= "apt-get update; \\\n\t\\\n\tapt-get install -y --no-install-recommends " . implode( ' ', $config['apt'] ) . ";";
397403

0 commit comments

Comments
 (0)