diff --git a/docker-compose.yaml b/docker-compose.yaml index c8eb85b..68c8745 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,6 +5,7 @@ services: build: context: ./docker/php volumes: + - ./docker/php/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - .:/var/www depends_on: - database diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index cb277c1..946d512 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -4,7 +4,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ unzip \ && rm -rf /var/lib/apt/lists/* -RUN docker-php-ext-install pdo_mysql opcache bcmath +RUN pecl install xdebug-3.3.2 \ + && docker-php-ext-enable xdebug \ + && docker-php-ext-install pdo_mysql opcache bcmath # https://getcomposer.org/doc/03-cli.md#composer-allow-superuser ENV COMPOSER_ALLOW_SUPERUSER=1 diff --git a/docker/php/xdebug.ini b/docker/php/xdebug.ini new file mode 100644 index 0000000..d3b509d --- /dev/null +++ b/docker/php/xdebug.ini @@ -0,0 +1,4 @@ +zend_extension=xdebug +xdebug.mode=debug +xdebug.start_with_request=yes +xdebug.client_host=host.docker.internal