diff --git a/dist/bin/tissue-entrypoint.sh b/dist/bin/tissue-entrypoint.sh index 49280f5..d4689db 100755 --- a/dist/bin/tissue-entrypoint.sh +++ b/dist/bin/tissue-entrypoint.sh @@ -3,6 +3,7 @@ set -e if [[ "$APP_DEBUG" == "true" ]]; then 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 exec docker-php-entrypoint "$@" diff --git a/dist/php.d/99-xdebug.ini b/dist/php.d/99-xdebug.ini index 007daa1..f2a7c9d 100644 --- a/dist/php.d/99-xdebug.ini +++ b/dist/php.d/99-xdebug.ini @@ -1,4 +1,4 @@ ; Dockerでのデバッグ用設定 zend_extension=xdebug.so xdebug.remote_enable=true -xdebug.remote_host=host.docker.internal \ No newline at end of file +xdebug.remote_host=${PHP_XDEBUG_REMOTE_HOST} \ No newline at end of file