Skip to content

Commit 2fc0b03

Browse files
committed
refactor(Dockerfile): update xdebug version and default config
1 parent 0ad5557 commit 2fc0b03

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo
195195
--with-png-dir=/usr/include/ \
196196
--with-jpeg-dir=/usr/include/ && \
197197
docker-php-ext-install iconv pdo_mysql pdo_sqlite mysqli gd exif intl xsl json soap dom zip opcache && \
198-
pecl install xdebug-2.6.0 && \
198+
pecl install xdebug-2.6.1 && \
199199
docker-php-source delete && \
200200
EXPECTED_COMPOSER_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) && \
201201
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \

spaceonfire/bin/sof-start

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,12 @@ if [ "$APPLICATION_ENV" != "production" ]; then
132132
echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)"
133133
echo "xdebug.remote_enable=1"
134134
echo "xdebug.remote_autostart=1"
135-
echo "xdebug.remote_connect_back=1"
135+
echo "xdebug.remote_connect_back=0"
136+
echo "xdebug.remote_host=$(ip route|awk '/default/ { print $3 }')"
137+
echo "xdebug.idekey=docker"
138+
echo "xdebug.var_display_max_depth=-1"
139+
echo "xdebug.var_display_max_children=-1"
140+
echo "xdebug.var_display_max_data=-1"
136141
} > $XdebugFile
137142
fi
138143
fi

test/xdebug/docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: '3'
2+
3+
services:
4+
test:
5+
build: ../../
6+
image: spaceonfire/nginx-php-fpm:next
7+
ports:
8+
- 8080:80
9+
environment:
10+
- SOF_PRESET=default
11+
- APPLICATION_ENV=development
12+
- ENABLE_XDEBUG=1
13+
- PAGER=more
14+
- PUID=1000
15+
volumes:
16+
- ./:/var/www/html:Z

test/xdebug/index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
phpinfo();

0 commit comments

Comments
 (0)