15 lines
707 B
Text
15 lines
707 B
Text
|
|
FROM php:8.4.14-apache
|
||
|
|
|
||
|
|
# Install Xdebug for performance profiling
|
||
|
|
RUN pecl install xdebug-3.5.0 && \
|
||
|
|
docker-php-ext-enable xdebug
|
||
|
|
|
||
|
|
# Configure Xdebug for profiling
|
||
|
|
RUN echo "xdebug.mode=develop,profile" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
|
||
|
|
echo "xdebug.output_dir=/tmp" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
|
||
|
|
echo "xdebug.start_with_request=trigger" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
|
||
|
|
echo "xdebug.profiler_output_name=cachegrind.out.%p" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||
|
|
|
||
|
|
# Note: To trigger profiling, add ?XDEBUG_PROFILE=1 to any URL
|
||
|
|
# Profile files will be generated in /tmp/ inside the container
|