Linux+Dockerな開発環境でxdebugが使えるように、コールバック先IPアドレスの設定を調整

This commit is contained in:
shibafu 2019-03-18 23:22:28 +09:00
parent b8ceac51f7
commit 80fe53cf20
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ set -e
if [[ "$APP_DEBUG" == "true" ]]; then if [[ "$APP_DEBUG" == "true" ]]; then
export PHP_INI_SCAN_DIR=":/usr/local/etc/php/php.d" export PHP_INI_SCAN_DIR=":/usr/local/etc/php/php.d"
export PHP_XDEBUG_REMOTE_HOST=$(cat /etc/hosts | awk 'END{print $1}' | sed -r -e 's/[0-9]+$/1/g')
fi fi
exec docker-php-entrypoint "$@" exec docker-php-entrypoint "$@"

View File

@ -1,4 +1,4 @@
; Dockerでのデバッグ用設定 ; Dockerでのデバッグ用設定
zend_extension=xdebug.so zend_extension=xdebug.so
xdebug.remote_enable=true xdebug.remote_enable=true
xdebug.remote_host=host.docker.internal xdebug.remote_host=${PHP_XDEBUG_REMOTE_HOST}