Po przełączeniu z Docker Machine na Docker dla Mac xdebug przestał działać. Port 9000 na hoście jest nieosiągalny z kontenera z xdebug.
php.ini:
xdebug nie działa w Docker dla komputerów Mac
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_host=172.18.0.1
xdebug.idekey=PHPSTORM
dokowanym-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. :-(
Aby rozwiązać mój problem?
Tnaks !!! Pomogło mi! –
Dzięki. Istota (https://gist.github.com/ralphschindler/535dc5916ccbd06f53c1b0ee5a868c93), którą wysłałeś, działa doskonale. –