diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 905077bcf..2b4c813bc 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -79,11 +79,12 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +ENV PHP_OPCACHE_MEMORY_CONSUMTION 128 RUN { \ echo 'opcache.enable=1'; \ echo 'opcache.interned_strings_buffer=32'; \ echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ + echo 'opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMTION}'; \ echo 'opcache.save_comments=1'; \ echo 'opcache.revalidate_freq=60'; \ echo 'opcache.jit=1255'; \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index cea5d93b2..8da9c70d2 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_OPCACHE_MEMORY_CONSUMTION 128 RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ @@ -95,7 +96,7 @@ RUN { \ echo 'opcache.enable=1'; \ echo 'opcache.interned_strings_buffer=32'; \ echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ + echo 'opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMTION}'; \ echo 'opcache.save_comments=1'; \ echo 'opcache.revalidate_freq=60'; \ echo 'opcache.jit=1255'; \