Docker Community Forums

Share and learn in the Docker community.

Docker0 owning localhost instead of host stack


(Jphughes) #1

I have a container that uses the network host stack. If i change the hostname to localhost and then attempt to connect to that container, docker0 takes over that route and attempts to send me to the docker network instead of maintaining the network stack. Any other value than localhost works just fine. Is there a way to tell docker that it doesn’t control the localhost hostname? Been looking at the /etc/hosts file and routes and not seeing anything obvious about where this is happening so any help would be appreciated.

I am running docker on ubuntu core 16 via the docker snap.