Skip to content

Commit

Permalink
Disable xdebug and xhprof by default to avoid performance impact
Browse files Browse the repository at this point in the history
  • Loading branch information
lmakarov committed Oct 4, 2024
1 parent 84c6cf8 commit 3cdba8b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
7 changes: 5 additions & 2 deletions 8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
7 changes: 5 additions & 2 deletions 8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
9 changes: 6 additions & 3 deletions 8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 3cdba8b

Please sign in to comment.