diff --git a/Dockerfile.slim.apache b/Dockerfile.slim.apache index 2c498b0..0a516ce 100644 --- a/Dockerfile.slim.apache +++ b/Dockerfile.slim.apache @@ -33,10 +33,12 @@ ENV PHP_VERSION=${PHP_VERSION} # Install php an other packages RUN apt update \ && apt upgrade -y \ - && apt install -y software-properties-common --no-install-recommends \ - && add-apt-repository ppa:ondrej/php \ - && apt remove --purge -y software-properties-common \ - && apt autoremove -y \ + && apt install -y --no-install-recommends curl ca-certificates \ + && curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb \ + && dpkg -i /tmp/debsuryorg-archive-keyring.deb \ + && . /etc/os-release \ + && echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/php.list \ + && apt update \ && apt install -y --no-install-recommends \ nano \ sudo \ diff --git a/Dockerfile.slim.cli b/Dockerfile.slim.cli index 9025cdc..ae1d073 100644 --- a/Dockerfile.slim.cli +++ b/Dockerfile.slim.cli @@ -33,10 +33,12 @@ ENV PHP_VERSION=${PHP_VERSION} # Install php an other packages RUN apt update \ && apt upgrade -y \ - && apt install -y software-properties-common --no-install-recommends \ - && add-apt-repository ppa:ondrej/php \ - && apt remove --purge -y software-properties-common \ - && apt autoremove -y \ + && apt install -y --no-install-recommends curl ca-certificates \ + && curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb \ + && dpkg -i /tmp/debsuryorg-archive-keyring.deb \ + && . /etc/os-release \ + && echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/php.list \ + && apt update \ && apt install -y --no-install-recommends \ nano \ sudo \ diff --git a/Dockerfile.slim.fpm b/Dockerfile.slim.fpm index f279cc9..0c37967 100644 --- a/Dockerfile.slim.fpm +++ b/Dockerfile.slim.fpm @@ -33,10 +33,12 @@ ENV PHP_VERSION=${PHP_VERSION} # Install php an other packages RUN apt update \ && apt upgrade -y \ - && apt install -y software-properties-common --no-install-recommends \ - && add-apt-repository ppa:ondrej/php \ - && apt remove --purge -y software-properties-common \ - && apt autoremove -y \ + && apt install -y --no-install-recommends curl ca-certificates \ + && curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb \ + && dpkg -i /tmp/debsuryorg-archive-keyring.deb \ + && . /etc/os-release \ + && echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/php.list \ + && apt update \ && apt install -y --no-install-recommends \ nano \ sudo \ diff --git a/README.md b/README.md index 84880fd..44ff52e 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ Images of non-maintained versions are still available but no longer receive fixe ## Usage -The images are based on Ubuntu 24.04, with PHP from the [ondrej/php](https://launchpad.net/~ondrej/+archive/ubuntu/php) repository. +The images are based on Ubuntu 24.04, with PHP from the [Ondřej Surý's PHP repository](https://packages.sury.org/php/). Example with CLI: diff --git a/utils/Dockerfile.slim.blueprint b/utils/Dockerfile.slim.blueprint index a153395..0f4e75f 100644 --- a/utils/Dockerfile.slim.blueprint +++ b/utils/Dockerfile.slim.blueprint @@ -32,10 +32,12 @@ ENV PHP_VERSION=${PHP_VERSION} # Install php an other packages RUN apt update \ && apt upgrade -y \ - && apt install -y software-properties-common --no-install-recommends \ - && add-apt-repository ppa:ondrej/php \ - && apt remove --purge -y software-properties-common \ - && apt autoremove -y \ + && apt install -y --no-install-recommends curl ca-certificates \ + && curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb \ + && dpkg -i /tmp/debsuryorg-archive-keyring.deb \ + && . /etc/os-release \ + && echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/php.list \ + && apt update \ && apt install -y --no-install-recommends \ nano \ sudo \ diff --git a/utils/README.blueprint.md b/utils/README.blueprint.md index cb5e622..c9619bd 100644 --- a/utils/README.blueprint.md +++ b/utils/README.blueprint.md @@ -88,7 +88,7 @@ Images of non-maintained versions are still available but no longer receive fixe ## Usage -The images are based on Ubuntu 24.04, with PHP from the [ondrej/php](https://launchpad.net/~ondrej/+archive/ubuntu/php) repository. +The images are based on Ubuntu 24.04, with PHP from the [Ondřej Surý's PHP repository](https://packages.sury.org/php/). Example with CLI: