Skip to content

Commit

Permalink
#1 php xdebug and config
Browse files Browse the repository at this point in the history
  • Loading branch information
skoro committed Sep 7, 2024
1 parent 6abd932 commit 35f315d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions docker/php/xdebug.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
zend_extension=xdebug
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_host=host.docker.internal

0 comments on commit 35f315d

Please sign in to comment.