Docker Community Forums

Share and learn in the Docker community.

Is there no DNS resolving from a host container to different networks?


(Hvorragend) #1

I am using the following networks in docker:

host
Driver: host

myhomedocker_myhome-bridge
Driver: bridge
Subnet: 172.19.0.0/16
Gateway: 172.19.0.1

nginx-proxy
Driver: bridge
Subnet: 172.18.0.0/16
Gateway: 172.18.0.1

I have same container (e.g. https://hub.docker.com/r/bios/docker-alexa-ha-bridge/) running in the host network (–net=host). I am trying to access from this host container to any bridged one (“myhomedocker_myhome-bridge”). I am able to ping the IP, but they aren’t static. So I want to ping the hostname (container name). Without any success.

Is this normal behavior?
Or am I doing something wrong?

Could you please help me? I am a docker Newbie. :slight_smile:

Thank you very much.


(Sam) #2

unless you are using docker-compose to construct a local network, there is no inter container DNS support.


(Hvorragend) #3

Thank you for the answer.
Do you have an example for me?


(Sam) #4

no, search on docker-compose (it is a separate app you have to install)