Docker for mac ip of host

broken image
broken image

ISTR that being discussed in another context somewhere but the specifics are escaping me right now. I recommend using the host network mode for ease, however this will give you less control over your docker networks.

broken image

the inverse of what docker run -p NN:NN does). The images can be run with both host and bridge network modes. I think what would be needed here would be some mechanism to forward ports back out of the VM to the host (i.e. So I think I was too quick to tell I was seeing the same issue on native Linux, sorry. In the for-mac case the ⁠⁠⁠⁠172.17.0.1⁠⁠⁠⁠ is not going to be an address which the OSX host knows about, which is the crux of the issue here since something which ought to dial back to the mac will end up dailing back to the VM hosting the containers instead. I had done a docker run then a ⁠⁠⁠⁠curl localhost.⁠⁠⁠⁠ like the ticket says and saw an originating IP of 172.17.0.1, which is the IP of the ⁠⁠⁠⁠docker0⁠⁠⁠⁠ bridge, which thinking about it more is an IP of the originating host (even if one maybe wouldn't think about it as 'the' IP of the host). I had second thoughts about whether I had really reproduced on native Linux.