Forward the windows port to the docker vm.
Open powershell as administrator and run the following commands.
cd 'C:\Program Files\Oracle\VirtualBox\'
./VBoxManage controlvm "default" natpf1 "rule-name,tcp,,<port>,,<port>"
If that still does not work try:
Manually adding routes to the docker containers.
Connect to the docker machine by running:
docker-machine.exe ssh default
Find it’s local ip addresses by running :
On the windows host run powershell as administrator.
Find the virtual box interface(s) by running:
Locate the windows ip address that matches subnets with the docker machine.
Add a route to the internal docker interface(s) by running
route add <subnet> MASK <mask range> <windows ip gateway>
route add 10.0.2.0 MASK 255.255.255.0 192.168.99.1
route add 172.17.0.0 MASK 255.255.0.0 192.168.99.1
Check the windows host’s route have been forwarded by running
Ensure connectivity by pinging the docker’s internal address(es).