From 80fe53cf20f67abdfc8b7222f6d7047be3820820 Mon Sep 17 00:00:00 2001 From: shibafu Date: Mon, 18 Mar 2019 23:22:28 +0900 Subject: [PATCH] =?UTF-8?q?Linux+Docker=E3=81=AA=E9=96=8B=E7=99=BA?= =?UTF-8?q?=E7=92=B0=E5=A2=83=E3=81=A7xdebug=E3=81=8C=E4=BD=BF=E3=81=88?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=80=81=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=83=90=E3=83=83=E3=82=AF=E5=85=88IP=E3=82=A2?= =?UTF-8?q?=E3=83=89=E3=83=AC=E3=82=B9=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=82=92?= =?UTF-8?q?=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/bin/tissue-entrypoint.sh | 1 + dist/php.d/99-xdebug.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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