diff --git a/Dockerfile b/Dockerfile index d588ca8..3f4c31c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,9 +60,16 @@ RUN pecl install channel://pecl.php.net/xmlrpc-1.0.0RC3 && docker-php-ext-enable # Optional: Install and enable Imagick (used by Moodle for better image processing) RUN pecl install imagick && docker-php-ext-enable imagick +# Install Xdebug +RUN pecl install xdebug \ + && docker-php-ext-enable xdebug + # Set recommended PHP configuration values for Moodle COPY moodle-php.ini /usr/local/etc/php/conf.d/moodle-php.ini +# Copy custom php.ini +COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini + # Create moodledata directory RUN mkdir -p /var/www/moodledata && \ chown -R www-data:www-data /var/www/moodledata && \ diff --git a/xdebug.ini b/xdebug.ini new file mode 100644 index 0000000..a8c3001 --- /dev/null +++ b/xdebug.ini @@ -0,0 +1,11 @@ +zend_extension=xdebug + +xdebug.mode=debug +xdebug.start_with_request=yes +xdebug.client_host=172.17.80.1 +xdebug.client_port=9003 +xdebug.log=/tmp/xdebug.log + +; Optional for development +xdebug.discover_client_host=true +xdebug.idekey=VSCODE