So adding to this question. This is my Docker network which shows a container attached with an IP address of 203.0.113.2. I can see in ifconfig an interface called bridge100 which has an ip address of 192.168.64.1.
Thus I would have expected that adding the following route:
route -n add 203.0.113.0/24 192.168.64.1 would allow me to connect to the containers IP address from my Mac. However that does not work. Am I missing something here ?
If I run Docker in virtualbox and do the same and add a route from my mac to the virtualbox interface it works.
OK I did some more research and replicated each of the steps from my Mac on a Linux (Ubuntu) platform. Everything worked fine, I didn’t even need to add any routes and could connect to the docker container IP’s straight away. I then added a static route from my mac to the IP address of the Linux platform which then enabled me to connect from my Mac to the containers running on Linux.
So I guess there are still issues with networking on the Mac.
Yes we are aware of this (internal issue #2216).By default the bridge will not accept routes over it. Will update when we have decided how to resolve this.
Also having this issue and would definitely appreciate if it would be solved so that developing with Docker would be consistent on any platform including OS X. Keep up the good work!
What I would like to understand is Docker’s strategy for this issue and some feedback on this channel so we can understand what to expect from Docker.
For those who haven’t yet got a working solution for this, I have created a shim workaround for this issue in this project. It behaves the exact same as the hvint0 interface on Windows
More details can be found here:
Honestly the fact this issue hasn’t been fixed is ridiculous so I plan to make some waves with this package. Request to update docs here:
docker/docker.github.io#3922
Please upvote and comment your support so that this issue gets the attention it deserves