From 29ab1676122e95f41cdc9a74828dd46d38c64819 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 20 Apr 2022 21:34:53 +0200 Subject: [PATCH] fix build for PHP 8.1 and no longer (additional) install of PHP 7.4 for PHP 8.x --- doc/docker/fpm/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/docker/fpm/Dockerfile b/doc/docker/fpm/Dockerfile index 5c0cb5b85c..0ab766e49f 100644 --- a/doc/docker/fpm/Dockerfile +++ b/doc/docker/fpm/Dockerfile @@ -17,7 +17,9 @@ RUN apt-get update \ && apt-get install -y software-properties-common \ && LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php \ && apt-get update \ - && bash -c "apt-get install -y php$PHP_VERSION-{cli,mysql,gd,xsl,bz2,opcache,apcu,tidy,zip,bcmath,mbstring,smbclient,ldap,curl,fpm,pgsql,gmp,memcached}" \ + && bash -c "apt-get install -y php$PHP_VERSION-{cli,mysql,gd,xsl,bz2,opcache,tidy,zip,bcmath,mbstring,smbclient,ldap,curl,fpm,pgsql,gmp,memcached}" \ + # php8.{0,1}-apcu recommends (not needed) php-apcu-bc, which cause PHP 7.4 to be installed :( + && apt-get install --no-install-recommends -y php$PHP_VERSION-apcu \ && bash -c "[[ $PHP_VERSION =~ ^8\..* ]] || apt-get install -y php$PHP_VERSION-json" \ # fpm and php.ini settings && sed -e 's/^;\?listen \?=.*/listen = 9000/g' \ @@ -69,7 +71,8 @@ fi; \ rm composer-setup.php; \ exit $RESULT' \ && cd /usr/share \ - && [ $PHP_VERSION = "8.0" ] && COMPOSER_EXTRA=--ignore-platform-reqs || true \ + # not all dependencies already allow PHP 8.x, thought what we use from them works + && bash -c "[[ $PHP_VERSION =~ ^8\..* ]]" && COMPOSER_EXTRA=--ignore-platform-reqs || true \ && composer.phar create-project $COMPOSER_EXTRA --prefer-dist --no-scripts --no-dev egroupware/egroupware:$VERSION \ && cd egroupware \ && npm install \ @@ -109,4 +112,4 @@ EXPOSE 9000 ADD entrypoint.sh / CMD ["php-fpm", "--nodaemonize"] -ENTRYPOINT ["/entrypoint.sh"] +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file