fix: Debian Buster was also archived

This commit is contained in:
le0m
2026-01-26 21:43:04 +01:00
parent 08b0b74555
commit cc0e463339
+5 -4
View File
@@ -2,12 +2,13 @@ ARG BASE_IMAGE=php:latest
FROM ${BASE_IMAGE}
LABEL maintainer="dev@chialab.io"
# Fix Debian 9 (Stretch) source list, because it has been moved to archive
# Paranoid people should manually download and verify the signing key from https://ftp-master.debian.org/keys.html
RUN if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d '=' -f 2 | tr -d '"')" -eq "9" ]; then \
# Fix Debian 9 (Stretch) and 10 (Buster) source lists, because they have been moved to archive
# Paranoid people should manually download and verify the signing keys from https://ftp-master.debian.org/keys.html
RUN if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d '=' -f 2 | tr -d '"')" -lt "11" ]; then \
sed -i -e 's/deb.debian.org/archive.debian.org/g' \
-e 's/security.debian.org/archive.debian.org/g' \
-e '/stretch-updates/d' /etc/apt/sources.list; \
-e '/stretch-updates/d' \
-e '/buster-updates/d' /etc/apt/sources.list; \
apt-get update && apt-get install -y --allow-unauthenticated debian-archive-keyring; \
fi