【发布时间】:2017-01-01 19:10:59
【问题描述】:
从 Docker Machine 切换到 Docker Desktop for Mac 后,xdebug 停止工作。使用 xdebug 的容器无法访问主机上的端口 9000。
php.ini:
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_host=172.18.0.1
xdebug.idekey=PHPSTORM
docker-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. :-(
如何解决我的问题?
【问题讨论】:
标签: macos docker xdebug docker-for-mac docker-desktop