This question already has an answer here:
I need to setup a debugger on my container, that requires me to set the remote (docker host) IP. In different tutorials I find different IP addresses listed as possible solution. In my container I ran a webserver that showed me that connections made to the container from my host machine come from 172.19.0.1
. This is on Docker for Mac version 1.11.x
.
But how would I reliably find out the host IP as seen from the container on Docker for Mac? When would it be possible for this IP to change?
Edit: Duplicate of https://stackoverflow.com/a/24716645/6309
You can get the ip of the host from within the container by running this command: