From 5a46ae6cff4fa9067cf29d3cb3b6f0d83e0d4591 Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 5 Jul 2023 20:56:04 +0200 Subject: [PATCH] Add PHP 8.2 --- php8.0/Dockerfile | 2 +- php8.1/Dockerfile | 2 +- php8.2/Dockerfile | 30 ++++++++++++++++++++++++++++++ php8.2/php.ini | 17 +++++++++++++++++ 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 php8.2/Dockerfile create mode 100644 php8.2/php.ini diff --git a/php8.0/Dockerfile b/php8.0/Dockerfile index 721ddd4..15aa569 100644 --- a/php8.0/Dockerfile +++ b/php8.0/Dockerfile @@ -15,7 +15,7 @@ RUN set -ex; \ apt-get autoremove -y; apt-get autoclean; apt-get clean; \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; -RUN phpenmod curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype iconv pcntl openssl +RUN phpenmod curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype iconv RUN set -ex; \ curl -O -L https://phar.phpunit.de/phpunit-9.phar; \ diff --git a/php8.1/Dockerfile b/php8.1/Dockerfile index cd02d6b..fa40766 100644 --- a/php8.1/Dockerfile +++ b/php8.1/Dockerfile @@ -15,7 +15,7 @@ RUN set -ex; \ apt-get autoremove -y; apt-get autoclean; apt-get clean; \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; -RUN phpenmod curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype iconv pcntl openssl +RUN phpenmod curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype iconv RUN set -ex; \ curl -O -L https://phar.phpunit.de/phpunit-9.phar; \ diff --git a/php8.2/Dockerfile b/php8.2/Dockerfile new file mode 100644 index 0000000..056146e --- /dev/null +++ b/php8.2/Dockerfile @@ -0,0 +1,30 @@ +FROM debian:buster + +# install the PHP extensions we need +# see https://friendi.ca/resources/requirements/ +RUN set -ex; \ + apt-get update; \ + DEBIAN_FRONTEND=noninteractive apt-get install -q -y wget gnupg2 apt-transport-https lsb-release ca-certificates mariadb-client; \ + wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; \ + echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list; \ + apt-get update; \ + DEBIAN_FRONTEND=noninteractive apt-get install -q -y php8.2-gd git curl openssl \ + php8.2-cli php8.2-curl php8.2-mysql wget make \ + php8.2-redis php8.2-memcached php8.2-memcache \ + php8.2-apcu php8.2-xdebug php8.2-xml php8.2-zip php8.2-dev php8.2-mbstring; \ + apt-get autoremove -y; apt-get autoclean; apt-get clean; \ + rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; + +RUN phpenmod curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype iconv + +RUN set -ex; \ + curl -O -L https://phar.phpunit.de/phpunit-9.phar; \ + chmod +x phpunit-9.phar; \ + mv phpunit-9.phar /usr/local/bin/phpunit; +RUN set -ex; \ + curl -O -L https://getcomposer.org/download/1.10.15/composer.phar; \ + chmod +x composer.phar; \ + mv composer.phar /usr/local/bin/composer; + +RUN phpdismod xdebug +ADD php.ini /etc/php/8.2/cli/conf.d/friendica.ini diff --git a/php8.2/php.ini b/php8.2/php.ini new file mode 100644 index 0000000..0c9a2b2 --- /dev/null +++ b/php8.2/php.ini @@ -0,0 +1,17 @@ +memory_limit = 768M +phar.readonly = 0 ; only for building phar files on CI - should be disabled on production environments +; Opcache +opcache.enable=1 +opcache.enable_cli=1 +opcache.interned_strings_buffer=8 +opcache.max_accelerated_files=10000 +opcache.memory_consumption=128 +opcache.save_comments=1 +opcache.revalidate_freq=1 +apc.enabled=1 +apc.enable_cli=1 +error_reporting=-1 +log_errors_max_len=0 +zend.assertions=1 +assert.exception=1 +xdebug.show_exception_trace=0