Docker Community Forums

Share and learn in the Docker community.

Docker Node hostnames.set to localhost

(Micahzoltu) #1

I’m using the 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>

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

My expectation is that hostname -f would return 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 nodes created by Docker Cloud, I see:       localhost       a041ea6e-58dd-44cb-b215-7cd36152b20b

I believe this should actually be:       localhost       a041ea6e-58dd-44cb-b215-7cd36152b20b