Docker Community Forums

Share and learn in the Docker community.

Docker Node hostnames.set to localhost


(Micahzoltu) #1

I’m using the Packet.net integration with Docker Cloud and my hosts have their FQDN set to localhost on all of the nodes. This is breaking some monitoring I’m trying to get working and would like to know how I can enforce having the FQDN be set to what it actually is (<guid>.node.dockerapp.io).

root@a041ea6e-58dd-44cb-b215-7cd36152b20b:~# hostname -f
localhost
root@a041ea6e-58dd-44cb-b215-7cd36152b20b:~# hostname
a041ea6e-58dd-44cb-b215-7cd36152b20b

My expectation is that hostname -f would return a041ea6e-58dd-44cb-b215-7cd36152b20b.node.dockerapp.io. This is causing problems because the monitoring solution I’m trying to use uses the fully qualified hostname as the unique identifier for the host and having that be set to localhost breaks this. Also, the FQDN for the host should match the forward DNS record that Docker sets up.

Looking at /etc/hosts on one of the Packet.net nodes created by Docker Cloud, I see:

127.0.0.1       localhost       a041ea6e-58dd-44cb-b215-7cd36152b20b

I believe this should actually be:

127.0.0.1       a041ea6e-58dd-44cb-b215-7cd36152b20b.node.dockerapp.io       localhost       a041ea6e-58dd-44cb-b215-7cd36152b20b