Docker Community Forums

Share and learn in the Docker community.

I cannot reach my docker container hostname from another machine on a local network

(sudo99) #1

I am running docker version 17.09.0-ce on ubuntu Ubuntu 16.04.3 LTS Virtual machine, I cannot ping my container hostname from my vm and other machines that are running on the local network. But I am able to reach my container via the IP address only from my VM and I get Request time out when i try to ping the IP address from other machines. Any help will be much appreciated.

My docker container is using the default bridged network and my VM is also setup to use bridge network setting

(Sam) #2

well, there are a few things here…

1 the containers hostname is NOT added to the dns server of any machine on the network
2. typically containers are ONLY reachable thru the docker host address/hostname, and the exposed port.
the container is logically another process on the docker host, and does not have an identity of its own.
(I’ve been trying unsuccessfully for the last couple years to make a container operate like a vm from a networking perspective)…