Last active Nov 16, 2018

When the docker moved to the new engine, one of the things to go is docker0 network interface.
To quote the docs on networking

I want to connect from a container to a service on the host
The Mac has a changing IP address (or none if you have no network access).
Our current recommendation is to attach an unused IP to the lo0 interface on the Mac;
for example: sudo ifconfig lo0 alias 10.200.10.1/24, and make sure that your service is
listening on this address or 0.0.0.0 (ie not 127.0.0.1). Then containers can connect to this address.

What this essentially mean is that you don't have a network address to target with xdebug.

But there is a workaround...
You can either execute the following in your terminal to create a loopback interface alias to an ip
address

sudo ifconfig lo0 alias 10.254.254.254 255.255.255.0

You would, of course, have to reexecute it on restarts, as this is not a permanent solution.

Or if you want a more permanent solution, you can copy the com.docker_alias.plist file from config/osx-config to
/Library/LaunchDaemons/com.docker_alias.plist and from then on, on every reboot the loopback
will be setup.

To verify that everything has been setup properly, execute ifconfig from terminal and the output
should look along the lines of this