the Hyper-V switch is internal and Host IP is 10.0.75.1 (subnet 10.0.75.0/24) - the Linux VM uses DHCP (which the com.docker.proxy.exe provides on port 67/UDP) and your MobyLinuxVM will usually take the first free ip: 10.0.75.2 (this is all for beta v7).
Unfortunately it is not possible to use the internal IP 10.0.75.2.
I have to use the host IP (e.g. 192.168.100.2) as this one is used for a callback URL. Some other service outside of my Docker containers has to reach one of the containers using the external IP (in this example 192.168.100.2). I have created a port forwarding using netsh from the external IP to the interal IP 10.0.75.2 for this to work.
For some reason the only âoutsideâ IP I can not ping is the one of the host.
I could solve my problem using the hostname of the host machine as the callback URL.
For the one Docker container which was not able to ping the host by its public IP, I added an âextra_hostsâ entry to docker-compose.yml using the fixed internal IP 10.0.75.1.
FORGET IT. Windows Firewall was blocking java.exe proccess from the JDK for public connections, and the HyperV NAT was set as a public interface. After changing that policy to âallowâ on public everything works as expected.
I have the same problem as you, a dockerized Nginx inside an Hyper-V VM trying to reach port 8080 (tomcat) on host, but with no result, so Iâm surprised it worked for you. The same configuration worked well with Virtual Box.
I have also come to the conclusion of using extra_hosts on my docker-compose.yml, but it still wonât work. Which hostname did you give to the extra host?
These are the lines I added to my container configuration:
extra_hosts:
- "host:docker.local"
(I also tried with 10.0.75.1 instead of docker.local, this is just how Iâve got it now)
And this is part of the the nginx virtual host configuration: