This commit is contained in:
2022-11-28 10:13:17 +08:00
commit 283bac61eb
7 changed files with 83 additions and 0 deletions

9
php/dockerfile Normal file
View File

@@ -0,0 +1,9 @@
FROM php:8.1-fpm
# https://pecl.php.net/package/xdebug
RUN pecl channel-update pecl.php.net && \
pecl install xdebug-3.1.6
EXPOSE 9000
WORKDIR /var/www
CMD php-fpm

7
php/php Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
#echo ${BASH_ARGV[*]}
docker exec test-php php \
-dxdebug.mode=debug \
-dxdebug.start_with_request=1 \
`basename ${BASH_ARGV[0]}` \
"${@:1:$#-1}"

9
php/xdebug.ini Normal file
View File

@@ -0,0 +1,9 @@
[xdebug]
; https://xdebug.org/docs/all_settings
zend_extension=xdebug.so
xdebug.mode=debug
xdebug.idekey=netbeans-xdebug
xdebug.client_host=172.17.0.1
xdebug.start_with_request=trigger
xdebug.trigger=go