Open jtreminio opened 6 years ago
As of docker 18.03 it's host.docker.internal
for both windows and mac, there is an issue here for linux https://github.com/docker/for-linux/issues/264
Thanks @ntzm - looks like writing to /etc/hosts
is a no-go since that file is mounted and any changes are immediately discarded.
Currently suggest using 192.18.0.1 to access host from within container.
This really only works when user does not have any other networks defined and is spinning up a Dashtainer project on a vanilla host. If any other networks defined that IP is no longer valid.
Using
route | awk '/^default/ { print $2 }'
we can find the gateway that can be used for Xdebug (and other services that must reach host!).Windows and MacOS can use
docker.for.mac.host.internal
,docker.for.win.host.internal
. Maybe create an entry in/etc/hosts
for containers that need this?