diff --git a/8.1/Dockerfile b/8.1/Dockerfile index 58db4e46..dc5331af 100644 --- a/8.1/Dockerfile +++ b/8.1/Dockerfile @@ -145,8 +145,11 @@ RUN set -xe; \ pdo_sqlsrv \ sqlsrv \ ;\ - # Cleanup - apt-get clean; rm -rf /var/lib/apt/lists/* + # Disable xdebug and xhprof by default to avoid performance impact + # They can be enabled via environment variables at runtime (XDEBUG_ENABLED=1 and XHPROF_ENABLED=1) + # There is no native "docker-php-ext-disable", so we remove the ini files manually + rm -f "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"; \ + rm -f "$PHP_INI_DIR/conf.d/docker-php-ext-xhprof.ini" # PHP tools (installed globally) ENV \ diff --git a/8.2/Dockerfile b/8.2/Dockerfile index 71d5cf3b..954e9cdb 100644 --- a/8.2/Dockerfile +++ b/8.2/Dockerfile @@ -146,8 +146,11 @@ RUN set -xe; \ pdo_sqlsrv \ sqlsrv \ ;\ - # Cleanup - apt-get clean; rm -rf /var/lib/apt/lists/* + # Disable xdebug and xhprof by default to avoid performance impact + # They can be enabled via environment variables at runtime (XDEBUG_ENABLED=1 and XHPROF_ENABLED=1) + # There is no native "docker-php-ext-disable", so we remove the ini files manually + rm -f "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"; \ + rm -f "$PHP_INI_DIR/conf.d/docker-php-ext-xhprof.ini" # PHP tools (installed globally) ENV \ diff --git a/8.3/Dockerfile b/8.3/Dockerfile index 75990aeb..04abb0f5 100644 --- a/8.3/Dockerfile +++ b/8.3/Dockerfile @@ -145,12 +145,15 @@ RUN set -xe; \ ssh2 \ xdebug \ xhprof \ -# MSSQL PHP client + # MSSQL PHP client pdo_sqlsrv \ sqlsrv \ ;\ - # Cleanup - apt-get clean; rm -rf /var/lib/apt/lists/* + # Disable xdebug and xhprof by default to avoid performance impact + # They can be enabled via environment variables at runtime (XDEBUG_ENABLED=1 and XHPROF_ENABLED=1) + # There is no native "docker-php-ext-disable", so we remove the ini files manually + rm -f "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"; \ + rm -f "$PHP_INI_DIR/conf.d/docker-php-ext-xhprof.ini" # PHP tools (installed globally) ENV \