From 1bf2e95f05b437a564448020ae552353c4cb1e9a Mon Sep 17 00:00:00 2001 From: Thomas Clavier Date: Sat, 23 Jul 2022 18:36:02 +0200 Subject: [PATCH 1/4] Configure pm.max_children from env var Signed-off-by: Thomas Clavier --- 25/apache/Dockerfile | 2 ++ 25/fpm/Dockerfile | 2 ++ 26/apache/Dockerfile | 2 ++ 26/fpm/Dockerfile | 2 ++ 27/apache/Dockerfile | 2 ++ 27/fpm/Dockerfile | 2 ++ Dockerfile-debian.template | 2 ++ 7 files changed, 14 insertions(+) diff --git a/25/apache/Dockerfile b/25/apache/Dockerfile index 2c27d014..6820aa51 100644 --- a/25/apache/Dockerfile +++ b/25/apache/Dockerfile @@ -21,6 +21,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -108,6 +109,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/25/fpm/Dockerfile b/25/fpm/Dockerfile index 910f54d3..9d657f6b 100644 --- a/25/fpm/Dockerfile +++ b/25/fpm/Dockerfile @@ -21,6 +21,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -108,6 +109,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index a6b125cf..36d20dc8 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -21,6 +21,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -109,6 +110,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/26/fpm/Dockerfile b/26/fpm/Dockerfile index e3608e6e..e1548088 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -21,6 +21,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -109,6 +110,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/27/apache/Dockerfile b/27/apache/Dockerfile index 5fb93a29..d62295fa 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -21,6 +21,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -109,6 +110,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/27/fpm/Dockerfile b/27/fpm/Dockerfile index d183f371..c8f69ca3 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -21,6 +21,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -109,6 +110,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index cea5d93b..ebd9b17e 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -20,6 +20,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -108,6 +109,7 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ From 6a301fb1d62d004a0feed25f494fcf6948bf11ca Mon Sep 17 00:00:00 2001 From: Thomas Clavier Date: Thu, 26 Oct 2023 11:26:53 +0200 Subject: [PATCH 2/4] Revert "Configure pm.max_children from env var" This reverts commit 4ce703efa64958f8e719575af899ba57c32f104b. Signed-off-by: Thomas Clavier --- 25/apache/Dockerfile | 2 -- 25/fpm/Dockerfile | 2 -- 26/apache/Dockerfile | 2 -- 26/fpm/Dockerfile | 2 -- 27/apache/Dockerfile | 2 -- 27/fpm/Dockerfile | 2 -- Dockerfile-debian.template | 2 -- 7 files changed, 14 deletions(-) diff --git a/25/apache/Dockerfile b/25/apache/Dockerfile index 6820aa51..2c27d014 100644 --- a/25/apache/Dockerfile +++ b/25/apache/Dockerfile @@ -21,7 +21,6 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M -ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -109,7 +108,6 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/25/fpm/Dockerfile b/25/fpm/Dockerfile index 9d657f6b..910f54d3 100644 --- a/25/fpm/Dockerfile +++ b/25/fpm/Dockerfile @@ -21,7 +21,6 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M -ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -109,7 +108,6 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index 36d20dc8..a6b125cf 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -21,7 +21,6 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M -ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -110,7 +109,6 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/26/fpm/Dockerfile b/26/fpm/Dockerfile index e1548088..e3608e6e 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -21,7 +21,6 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M -ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -110,7 +109,6 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/27/apache/Dockerfile b/27/apache/Dockerfile index d62295fa..5fb93a29 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -21,7 +21,6 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M -ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -110,7 +109,6 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/27/fpm/Dockerfile b/27/fpm/Dockerfile index c8f69ca3..d183f371 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -21,7 +21,6 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M -ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -110,7 +109,6 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index ebd9b17e..cea5d93b 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -20,7 +20,6 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M -ENV PHP_PM_MAX_CHILDREN 16 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -109,7 +108,6 @@ RUN { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \ } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ \ mkdir /var/www/data; \ From f5f23fcebfa28b316503cdd4fb8aed1f6eefab9e Mon Sep 17 00:00:00 2001 From: Thomas Clavier Date: Thu, 26 Oct 2023 13:16:19 +0200 Subject: [PATCH 3/4] use PHP_FPM_DIR and PHP_PM_MAX_CHILDREN vars Signed-off-by: Thomas Clavier --- update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index f5e6f019..13669110 100755 --- a/update.sh +++ b/update.sh @@ -30,8 +30,8 @@ declare -A base=( declare -A extras=( [apache]='\nRUN a2enmod headers rewrite remoteip ; \\\n { \\\n echo '\''RemoteIPHeader X-Real-IP'\''; \\\n echo '\''RemoteIPInternalProxy 10.0.0.0/8'\''; \\\n echo '\''RemoteIPInternalProxy 172.16.0.0/12'\''; \\\n echo '\''RemoteIPInternalProxy 192.168.0.0/16'\''; \\\n } > /etc/apache2/conf-available/remoteip.conf; \\\n a2enconf remoteip\n\n# set apache config LimitRequestBody\nENV APACHE_BODY_LIMIT 1073741824\nRUN { \\\n echo '\''LimitRequestBody ${APACHE_BODY_LIMIT}'\''; \\\n } > /etc/apache2/conf-available/apache-limits.conf; \\\n a2enconf apache-limits' - [fpm]='' - [fpm-alpine]='' + [fpm]='\nENV PHP_PM_MAX_CHILDREN 16\nRUN {\\\n echo'\''pm = pm=dynamic'\''; \\\n echo'\''pm.start_servers = 4'\''; \\\n echo'\''pm.min_spare_servers = 2'\''; \\\n echo'\''pm.max_spare_servers = 24'\''; \\\n echo'\''pm.max_children = ${PHP_PM_MAX_CHILDREN}'\''; \\\n } > "${PHP_FPM_DIR}/nextcloud.conf";\n' + [fpm-alpine]='\nENV PHP_PM_MAX_CHILDREN 16\nRUN {\\\n echo'\''pm = pm=dynamic'\''; \\\n echo'\''pm.start_servers = 4'\''; \\\n echo'\''pm.min_spare_servers = 2'\''; \\\n echo'\''pm.max_spare_servers = 24'\''; \\\n echo'\''pm.max_children = ${PHP_PM_MAX_CHILDREN}'\''; \\\n } > "${PHP_FPM_DIR}/nextcloud.conf";\n' ) declare -A crontab_int=( From a5656577ef7c169c14e8f976ae08ef257f5bf94e Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 11 Feb 2025 18:01:24 +0100 Subject: [PATCH 4/4] Compile with igbinary (#2368) Signed-off-by: J0WI --- 29/apache/Dockerfile | 13 +++++++++++-- 29/fpm-alpine/Dockerfile | 13 +++++++++++-- 29/fpm/Dockerfile | 13 +++++++++++-- 30/apache/Dockerfile | 13 +++++++++++-- 30/fpm-alpine/Dockerfile | 13 +++++++++++-- 30/fpm/Dockerfile | 13 +++++++++++-- Dockerfile-alpine.template | 13 +++++++++++-- Dockerfile-debian.template | 13 +++++++++++-- update.sh | 33 ++++++++++++++++++++++----------- 9 files changed, 110 insertions(+), 27 deletions(-) diff --git a/29/apache/Dockerfile b/29/apache/Dockerfile index fa5fabae..19c0781c 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -67,12 +67,16 @@ RUN set -ex; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ + pecl install igbinary-3.2.16; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.3.0; \ - pecl install redis-6.1.0; \ + pecl install memcached-3.3.0 \ + --configureoptions 'enable-memcached-igbinary="yes"'; \ + pecl install redis-6.1.0 \ + --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \ \ docker-php-ext-enable \ apcu \ + igbinary \ imagick \ memcached \ redis \ @@ -108,6 +112,11 @@ RUN { \ \ echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ \ + { \ + echo 'apc.serializer=igbinary'; \ + echo 'session.serialize_handler=igbinary'; \ + } >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \ + \ { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index 61c6de6e..bdec7b10 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -64,12 +64,16 @@ RUN set -ex; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ + pecl install igbinary-3.2.16; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.3.0; \ - pecl install redis-6.1.0; \ + pecl install memcached-3.3.0 \ + --configureoptions 'enable-memcached-igbinary="yes"'; \ + pecl install redis-6.1.0 \ + --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \ \ docker-php-ext-enable \ apcu \ + igbinary \ imagick \ memcached \ redis \ @@ -103,6 +107,11 @@ RUN { \ \ echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ \ + { \ + echo 'apc.serializer=igbinary'; \ + echo 'session.serialize_handler=igbinary'; \ + } >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \ + \ { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ diff --git a/29/fpm/Dockerfile b/29/fpm/Dockerfile index 2a64b02a..ae7c527c 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -67,12 +67,16 @@ RUN set -ex; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ + pecl install igbinary-3.2.16; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.3.0; \ - pecl install redis-6.1.0; \ + pecl install memcached-3.3.0 \ + --configureoptions 'enable-memcached-igbinary="yes"'; \ + pecl install redis-6.1.0 \ + --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \ \ docker-php-ext-enable \ apcu \ + igbinary \ imagick \ memcached \ redis \ @@ -108,6 +112,11 @@ RUN { \ \ echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ \ + { \ + echo 'apc.serializer=igbinary'; \ + echo 'session.serialize_handler=igbinary'; \ + } >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \ + \ { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ diff --git a/30/apache/Dockerfile b/30/apache/Dockerfile index f82a1d9e..4334e170 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -67,12 +67,16 @@ RUN set -ex; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ + pecl install igbinary-3.2.16; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.3.0; \ - pecl install redis-6.1.0; \ + pecl install memcached-3.3.0 \ + --configureoptions 'enable-memcached-igbinary="yes"'; \ + pecl install redis-6.1.0 \ + --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \ \ docker-php-ext-enable \ apcu \ + igbinary \ imagick \ memcached \ redis \ @@ -108,6 +112,11 @@ RUN { \ \ echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ \ + { \ + echo 'apc.serializer=igbinary'; \ + echo 'session.serialize_handler=igbinary'; \ + } >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \ + \ { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ diff --git a/30/fpm-alpine/Dockerfile b/30/fpm-alpine/Dockerfile index 26e4a568..6ca9bda9 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -64,12 +64,16 @@ RUN set -ex; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ + pecl install igbinary-3.2.16; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.3.0; \ - pecl install redis-6.1.0; \ + pecl install memcached-3.3.0 \ + --configureoptions 'enable-memcached-igbinary="yes"'; \ + pecl install redis-6.1.0 \ + --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \ \ docker-php-ext-enable \ apcu \ + igbinary \ imagick \ memcached \ redis \ @@ -103,6 +107,11 @@ RUN { \ \ echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ \ + { \ + echo 'apc.serializer=igbinary'; \ + echo 'session.serialize_handler=igbinary'; \ + } >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \ + \ { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ diff --git a/30/fpm/Dockerfile b/30/fpm/Dockerfile index c0769823..f13ce297 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -67,12 +67,16 @@ RUN set -ex; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ + pecl install igbinary-3.2.16; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.3.0; \ - pecl install redis-6.1.0; \ + pecl install memcached-3.3.0 \ + --configureoptions 'enable-memcached-igbinary="yes"'; \ + pecl install redis-6.1.0 \ + --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \ \ docker-php-ext-enable \ apcu \ + igbinary \ imagick \ memcached \ redis \ @@ -108,6 +112,11 @@ RUN { \ \ echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ \ + { \ + echo 'apc.serializer=igbinary'; \ + echo 'session.serialize_handler=igbinary'; \ + } >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \ + \ { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index c5517536..cf6af0ff 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -63,12 +63,16 @@ RUN set -ex; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-%%APCU_VERSION%%; \ + pecl install igbinary-%%IGBINARY_VERSION%%; \ pecl install imagick-%%IMAGICK_VERSION%%; \ - pecl install memcached-%%MEMCACHED_VERSION%%; \ - pecl install redis-%%REDIS_VERSION%%; \ + pecl install memcached-%%MEMCACHED_VERSION%% \ + --configureoptions 'enable-memcached-igbinary="yes"'; \ + pecl install redis-%%REDIS_VERSION%% \ + --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \ \ docker-php-ext-enable \ apcu \ + igbinary \ imagick \ memcached \ redis \ @@ -102,6 +106,11 @@ RUN { \ \ echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ \ + { \ + echo 'apc.serializer=igbinary'; \ + echo 'session.serialize_handler=igbinary'; \ + } >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \ + \ { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 9695c010..cadae18a 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -66,12 +66,16 @@ RUN set -ex; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-%%APCU_VERSION%%; \ + pecl install igbinary-%%IGBINARY_VERSION%%; \ pecl install imagick-%%IMAGICK_VERSION%%; \ - pecl install memcached-%%MEMCACHED_VERSION%%; \ - pecl install redis-%%REDIS_VERSION%%; \ + pecl install memcached-%%MEMCACHED_VERSION%% \ + --configureoptions 'enable-memcached-igbinary="yes"'; \ + pecl install redis-%%REDIS_VERSION%% \ + --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \ \ docker-php-ext-enable \ apcu \ + igbinary \ imagick \ memcached \ redis \ @@ -107,6 +111,11 @@ RUN { \ \ echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ \ + { \ + echo 'apc.serializer=igbinary'; \ + echo 'session.serialize_handler=igbinary'; \ + } >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \ + \ { \ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ diff --git a/update.sh b/update.sh index 9898a6c0..f55da259 100755 --- a/update.sh +++ b/update.sh @@ -44,6 +44,24 @@ apcu_version="$( | tail -1 )" +igbinary_version="$( + git ls-remote --tags https://github.com/igbinary/igbinary.git \ + | cut -d/ -f3 \ + | grep -viE '[a-z]' \ + | tr -d '^{}' \ + | sort -V \ + | tail -1 +)" + +imagick_version="$( + git ls-remote --tags https://github.com/mkoppanen/imagick.git \ + | cut -d/ -f3 \ + | grep -viE '[a-z]' \ + | tr -d '^{}' \ + | sort -V \ + | tail -1 +)" + memcached_version="$( git ls-remote --tags https://github.com/php-memcached-dev/php-memcached.git \ | cut -d/ -f3 \ @@ -62,20 +80,12 @@ redis_version="$( | tail -1 )" -imagick_version="$( - git ls-remote --tags https://github.com/mkoppanen/imagick.git \ - | cut -d/ -f3 \ - | grep -viE '[a-z]' \ - | tr -d '^{}' \ - | sort -V \ - | tail -1 -)" - declare -A pecl_versions=( [APCu]="$apcu_version" + [igbinary]="$igbinary_version" + [imagick]="$imagick_version" [memcached]="$memcached_version" [redis]="$redis_version" - [imagick]="$imagick_version" ) variants=( @@ -121,9 +131,10 @@ function create_variant() { s/%%CMD%%/'"${cmd[$variant]}"'/g; s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g; s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/g; + s/%%IGBINARY_VERSION%%/'"${pecl_versions[igbinary]}"'/g; + s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g; s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g; s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g; - s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g; s/%%CRONTAB_INT%%/'"$crontabInt"'/g; ' "$dir/Dockerfile"