後,我從泊塢窗機切換到多克的Mac XDebug的已停止工作。主機上的端口9000無法從具有xdebug的容器中訪問。
的php.ini:
Xdebug的在泊塢窗不工作的Mac
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_host=172.18.0.1
xdebug.idekey=PHPSTORM
搬運工-compose.yml:
version: '2'
services:
php:
image: <image name>
ports:
- 80:80
# - 9000:9000
volumes:
- .:/var/www/html
- ./php.ini:/usr/local/etc/php/conf.d/php.ini
xdebug.log:
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to 172.18.0.1:9000.
E: Could not connect to client. :-(
是否解決我的問題?
Tnaks!它幫助了我! –
謝謝。你發佈的要點(https://gist.github.com/ralphschindler/535dc5916ccbd06f53c1b0ee5a868c93)是完美的。 –