From 3594113debb34b5f92e809bf9ab4d68a476b9f35 Mon Sep 17 00:00:00 2001 From: le0m Date: Mon, 12 Jun 2023 13:11:41 +0200 Subject: [PATCH] fix: debian 9 has been moved to archive --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index f8a9d3e..cae8d9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +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 +RUN if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d '=' -f 2 | tr -d '"')" -eq "9" ]; 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; \ + fi + # Download script to install PHP extensions and dependencies ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/