diff --git a/Dockerfile.template b/Dockerfile.template index 1f9c256d4d..b57f47f6af 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -133,18 +133,20 @@ RUN set -ex; \ # set recommended PHP.ini settings {{ if env.version != "cli" then ( -}} # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" {{ ) else ( -}} # excluding opcache due https://github.com/docker-library/wordpress/issues/407 {{ ) end -}} # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -156,7 +158,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" {{ if env.variant == "apache" then ( -}} RUN set -eux; \ diff --git a/beta/php8.1/apache/Dockerfile b/beta/php8.1/apache/Dockerfile index cfce44c1ee..f81ca23247 100644 --- a/beta/php8.1/apache/Dockerfile +++ b/beta/php8.1/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/beta/php8.1/fpm-alpine/Dockerfile b/beta/php8.1/fpm-alpine/Dockerfile index f3dab6905d..a77e6d9118 100644 --- a/beta/php8.1/fpm-alpine/Dockerfile +++ b/beta/php8.1/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/beta/php8.1/fpm/Dockerfile b/beta/php8.1/fpm/Dockerfile index 50cd751da8..6704324594 100644 --- a/beta/php8.1/fpm/Dockerfile +++ b/beta/php8.1/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/beta/php8.2/apache/Dockerfile b/beta/php8.2/apache/Dockerfile index 545a938b4b..8985e3ee74 100644 --- a/beta/php8.2/apache/Dockerfile +++ b/beta/php8.2/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/beta/php8.2/fpm-alpine/Dockerfile b/beta/php8.2/fpm-alpine/Dockerfile index e0940e57e4..b49248244a 100644 --- a/beta/php8.2/fpm-alpine/Dockerfile +++ b/beta/php8.2/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/beta/php8.2/fpm/Dockerfile b/beta/php8.2/fpm/Dockerfile index 43ccaf9064..a0a3666a44 100644 --- a/beta/php8.2/fpm/Dockerfile +++ b/beta/php8.2/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/beta/php8.3/apache/Dockerfile b/beta/php8.3/apache/Dockerfile index beb177f6bb..9523ae3f14 100644 --- a/beta/php8.3/apache/Dockerfile +++ b/beta/php8.3/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/beta/php8.3/fpm-alpine/Dockerfile b/beta/php8.3/fpm-alpine/Dockerfile index 8647d7a42e..d939abb659 100644 --- a/beta/php8.3/fpm-alpine/Dockerfile +++ b/beta/php8.3/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/beta/php8.3/fpm/Dockerfile b/beta/php8.3/fpm/Dockerfile index 5f2be0ab8c..c980226c54 100644 --- a/beta/php8.3/fpm/Dockerfile +++ b/beta/php8.3/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/beta/php8.4/apache/Dockerfile b/beta/php8.4/apache/Dockerfile index 5c18cf9462..ca9421b4d9 100644 --- a/beta/php8.4/apache/Dockerfile +++ b/beta/php8.4/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/beta/php8.4/fpm-alpine/Dockerfile b/beta/php8.4/fpm-alpine/Dockerfile index 5cb3af1a1b..765770de66 100644 --- a/beta/php8.4/fpm-alpine/Dockerfile +++ b/beta/php8.4/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/beta/php8.4/fpm/Dockerfile b/beta/php8.4/fpm/Dockerfile index d62a6deb98..da897a15d0 100644 --- a/beta/php8.4/fpm/Dockerfile +++ b/beta/php8.4/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/beta/php8.5/apache/Dockerfile b/beta/php8.5/apache/Dockerfile index f463ca821c..6b52202606 100644 --- a/beta/php8.5/apache/Dockerfile +++ b/beta/php8.5/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/beta/php8.5/fpm-alpine/Dockerfile b/beta/php8.5/fpm-alpine/Dockerfile index 945ccddfa5..ae8bbccca2 100644 --- a/beta/php8.5/fpm-alpine/Dockerfile +++ b/beta/php8.5/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/beta/php8.5/fpm/Dockerfile b/beta/php8.5/fpm/Dockerfile index e5b2a0cd94..e3be70aca1 100644 --- a/beta/php8.5/fpm/Dockerfile +++ b/beta/php8.5/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.9-RC4'; \ diff --git a/cli/php8.1/alpine/Dockerfile b/cli/php8.1/alpine/Dockerfile index bc5e01cb65..ada00e93b3 100644 --- a/cli/php8.1/alpine/Dockerfile +++ b/cli/php8.1/alpine/Dockerfile @@ -78,7 +78,8 @@ RUN set -ex; \ # set recommended PHP.ini settings # excluding opcache due https://github.com/docker-library/wordpress/issues/407 # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -90,7 +91,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" # https://make.wordpress.org/cli/2018/05/31/gpg-signature-change/ # pub rsa2048 2018-05-31 [SC] diff --git a/cli/php8.2/alpine/Dockerfile b/cli/php8.2/alpine/Dockerfile index ed1591fe35..cda8c98249 100644 --- a/cli/php8.2/alpine/Dockerfile +++ b/cli/php8.2/alpine/Dockerfile @@ -78,7 +78,8 @@ RUN set -ex; \ # set recommended PHP.ini settings # excluding opcache due https://github.com/docker-library/wordpress/issues/407 # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -90,7 +91,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" # https://make.wordpress.org/cli/2018/05/31/gpg-signature-change/ # pub rsa2048 2018-05-31 [SC] diff --git a/cli/php8.3/alpine/Dockerfile b/cli/php8.3/alpine/Dockerfile index fa794a4a99..31fa8dfd09 100644 --- a/cli/php8.3/alpine/Dockerfile +++ b/cli/php8.3/alpine/Dockerfile @@ -78,7 +78,8 @@ RUN set -ex; \ # set recommended PHP.ini settings # excluding opcache due https://github.com/docker-library/wordpress/issues/407 # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -90,7 +91,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" # https://make.wordpress.org/cli/2018/05/31/gpg-signature-change/ # pub rsa2048 2018-05-31 [SC] diff --git a/cli/php8.4/alpine/Dockerfile b/cli/php8.4/alpine/Dockerfile index 2ecb12201e..c7948b406a 100644 --- a/cli/php8.4/alpine/Dockerfile +++ b/cli/php8.4/alpine/Dockerfile @@ -78,7 +78,8 @@ RUN set -ex; \ # set recommended PHP.ini settings # excluding opcache due https://github.com/docker-library/wordpress/issues/407 # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -90,7 +91,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" # https://make.wordpress.org/cli/2018/05/31/gpg-signature-change/ # pub rsa2048 2018-05-31 [SC] diff --git a/cli/php8.5/alpine/Dockerfile b/cli/php8.5/alpine/Dockerfile index 50fb5c70e3..147f4bd8a5 100644 --- a/cli/php8.5/alpine/Dockerfile +++ b/cli/php8.5/alpine/Dockerfile @@ -78,7 +78,8 @@ RUN set -ex; \ # set recommended PHP.ini settings # excluding opcache due https://github.com/docker-library/wordpress/issues/407 # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -90,7 +91,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" # https://make.wordpress.org/cli/2018/05/31/gpg-signature-change/ # pub rsa2048 2018-05-31 [SC] diff --git a/latest/php8.1/apache/Dockerfile b/latest/php8.1/apache/Dockerfile index 7c74d0e128..c20f8c43bb 100644 --- a/latest/php8.1/apache/Dockerfile +++ b/latest/php8.1/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/latest/php8.1/fpm-alpine/Dockerfile b/latest/php8.1/fpm-alpine/Dockerfile index 65a9cd0e3a..bbbcf2cad5 100644 --- a/latest/php8.1/fpm-alpine/Dockerfile +++ b/latest/php8.1/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \ diff --git a/latest/php8.1/fpm/Dockerfile b/latest/php8.1/fpm/Dockerfile index 7327e07847..0a236a79a1 100644 --- a/latest/php8.1/fpm/Dockerfile +++ b/latest/php8.1/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \ diff --git a/latest/php8.2/apache/Dockerfile b/latest/php8.2/apache/Dockerfile index d78d7b21bb..2d4c453339 100644 --- a/latest/php8.2/apache/Dockerfile +++ b/latest/php8.2/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/latest/php8.2/fpm-alpine/Dockerfile b/latest/php8.2/fpm-alpine/Dockerfile index f819c0b049..0b0b3adf8c 100644 --- a/latest/php8.2/fpm-alpine/Dockerfile +++ b/latest/php8.2/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \ diff --git a/latest/php8.2/fpm/Dockerfile b/latest/php8.2/fpm/Dockerfile index 0218e1a391..3d27baaf38 100644 --- a/latest/php8.2/fpm/Dockerfile +++ b/latest/php8.2/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \ diff --git a/latest/php8.3/apache/Dockerfile b/latest/php8.3/apache/Dockerfile index 750a8bf1a9..79412b2066 100644 --- a/latest/php8.3/apache/Dockerfile +++ b/latest/php8.3/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/latest/php8.3/fpm-alpine/Dockerfile b/latest/php8.3/fpm-alpine/Dockerfile index d858d341dd..c319154ab7 100644 --- a/latest/php8.3/fpm-alpine/Dockerfile +++ b/latest/php8.3/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \ diff --git a/latest/php8.3/fpm/Dockerfile b/latest/php8.3/fpm/Dockerfile index 491fc8d895..b93b603f5b 100644 --- a/latest/php8.3/fpm/Dockerfile +++ b/latest/php8.3/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \ diff --git a/latest/php8.4/apache/Dockerfile b/latest/php8.4/apache/Dockerfile index 27b5ae8f3a..89ec0dc3e6 100644 --- a/latest/php8.4/apache/Dockerfile +++ b/latest/php8.4/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/latest/php8.4/fpm-alpine/Dockerfile b/latest/php8.4/fpm-alpine/Dockerfile index 3a9ad1987f..428bf01127 100644 --- a/latest/php8.4/fpm-alpine/Dockerfile +++ b/latest/php8.4/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \ diff --git a/latest/php8.4/fpm/Dockerfile b/latest/php8.4/fpm/Dockerfile index 36328c4781..484e7cfd3d 100644 --- a/latest/php8.4/fpm/Dockerfile +++ b/latest/php8.4/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \ diff --git a/latest/php8.5/apache/Dockerfile b/latest/php8.5/apache/Dockerfile index 87b5de1270..4fb40cdb89 100644 --- a/latest/php8.5/apache/Dockerfile +++ b/latest/php8.5/apache/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ a2enmod rewrite expires; \ diff --git a/latest/php8.5/fpm-alpine/Dockerfile b/latest/php8.5/fpm-alpine/Dockerfile index 3da7d7f3d2..1603406455 100644 --- a/latest/php8.5/fpm-alpine/Dockerfile +++ b/latest/php8.5/fpm-alpine/Dockerfile @@ -76,15 +76,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -96,7 +98,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \ diff --git a/latest/php8.5/fpm/Dockerfile b/latest/php8.5/fpm/Dockerfile index 20b5a8c1ab..4f11deb56a 100644 --- a/latest/php8.5/fpm/Dockerfile +++ b/latest/php8.5/fpm/Dockerfile @@ -80,15 +80,17 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php +# enabled by default in the php images: https://github.com/docker-library/php/pull/1587 RUN set -eux; \ { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + } > "$PHP_INI_DIR/conf.d/opcache-recommended.ini" # https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging -RUN { \ +RUN set -eux; \ + { \ # https://www.php.net/manual/en/errorfunc.constants.php # https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670 echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \ @@ -100,7 +102,7 @@ RUN { \ echo 'ignore_repeated_errors = On'; \ echo 'ignore_repeated_source = Off'; \ echo 'html_errors = Off'; \ - } > /usr/local/etc/php/conf.d/error-logging.ini + } > "$PHP_INI_DIR/conf.d/error-logging.ini" RUN set -eux; \ version='6.8.3'; \