nc host.docker.internal is not working inside a container to access the host IP address

  docker, docker-machine, netcat

I have started my nc utility inside a container named “ain_container” and exposed two proxies to outside as shown below with the ubuntu 14.04 image.

enter image description here

Then I started the nc utility with two ports as shown below

enter image description here

Now I Have created two more containers with ubuntu 14.04 image and trying to access and listen in these two containers.

I’m trying to connect to host IP with host.docker.internal but somehow its giving an error.

enter image description here

Source: StackOverflow

LEAVE A COMMENT