diff --git a/Dockerfile b/Dockerfile index 3370c83..78d9477 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,10 +32,14 @@ RUN apt-get update -yqq \ && rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man \ && apt-get clean +RUN pecl install xdebug + RUN docker-php-ext-configure gd --with-jpeg RUN docker-php-ext-install gd pdo_mysql zip +RUN docker-php-ext-enable xdebug + COPY --chown=app:app phpunit.xml* ./ diff --git a/docker-compose.override.yaml.example b/docker-compose.override.yaml.example index 033de45..975168f 100644 --- a/docker-compose.override.yaml.example +++ b/docker-compose.override.yaml.example @@ -1,8 +1,6 @@ services: - php-fpm: + php: + environment: + XDEBUG_MODE: ${XDEBUG_MODE:-off} extra_hosts: - - "host.docker.internal:host-gateway" - - web: - ports: - - "80:80" + host.docker.internal: host-gateway diff --git a/tools/docker/images/php/root/usr/local/etc/php/conf.d/xdebug.ini b/tools/docker/images/php/root/usr/local/etc/php/conf.d/xdebug.ini index 7ec1890..d73678c 100644 --- a/tools/docker/images/php/root/usr/local/etc/php/conf.d/xdebug.ini +++ b/tools/docker/images/php/root/usr/local/etc/php/conf.d/xdebug.ini @@ -1,6 +1,3 @@ -xdebug.mode=develop,debug xdebug.client_host=host.docker.internal xdebug.discover_client_host=0 -xdebug.output_dir=/tmp/xdebug -xdebug.log=/tmp/xdebug/xdebug-docker-drupal-example.log xdebug.start_with_request=yes