Command returns 0.0.0.0 for IP but only for leader I have a 3 node docker swarm cluster and I am trying to get the IPs of each one via docker node inspect node-1 --format '{{ .Status.Addr  }}' but I am having an issue where when the node I am trying for (example node-1 from above), that I get back 0.0.0.0. This only happens on the leader node, the others work just fine.

What is happening in this case? Also, how can I use docker commands to get the IP of all the nodes when checking with their hostnames or docker node ls?
I ended up using {{.ManagerStatus.Addr}} and stripping the port number from the results with sed.  

for NODE in $(docker  node ls -f 'role=manager' --format '{{.Hostname}}'); do
  docker node inspect --format '{{.ManagerStatus.Addr}}' ${NODE} | sed 's/:2377//'
done