Docker Community Forums

Share and learn in the Docker community.

Ip address is accessible from docker host, but not from docker container running on the host

There’s some virtual machine internal network ip address which is accessible from MAC docker host. This was verified using ping.

However, the same ip address is not accessible from any docker container running on the Docker host.

I tried to run container with --network host, however the ip is still not reachable.

Then, I discovered that none of the VMs reachable from MAC docker host are reachable from any docker container running on it.

How to debug and solve this issue?

External ip addresses (of google.com ) are accessible from the container.

I performed the same test on Linux docker host. The same internal VM ip address was reachable from within the container as well as all other VMs.

It’s important to note that MAC docker host is just MAC machine connecting to the network using VPN and thus getting access to internal network VMs.

Linux Docker host is VM itself in the internal network where VMs are located.

I’m using 3.6.0 MAC Docker desktop version and update regularly.