PHP Snippet 1:
<?php
phpinfo();
PHP Snippet 2:
# PECL
RUN mkdir -p /tmp/pear/cache
RUN pecl channel-update pecl.php.net
RUN apt install -y php-pear
COPY xdebug.ini "/etc/php/${PHP_VERSION}/mods-available/xdebug.ini"
# The xdebug distributed with Ubuntu 20.04 LTS is v2.9.2, we want v3.0.x
RUN pecl install xdebug
# Enable xdebug by default
RUN phpenmod xdebug
PHP Snippet 3:
zend_extension=xdebug.so
xdebug.default_enable = On
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.discover_client_host=yes
xdebug.max_nesting_level = -1
xdebug.log = "/var/www/log/xdebug.log"
xdebug.output_dir = "/var/www/log/profiler"
PHP Snippet 4:
docker stop
docker build --no-cache
docker up
PHP Snippet 5:
tail -n 100 /var/www/log/xdebug.log