Created
February 25, 2019 16:59
-
-
Save hartsock/d71149f6ff7bbbd8d4669447b2ac2519 to your computer and use it in GitHub Desktop.
Docker Swarm - List all Node IP addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for NODE in $(docker node ls --format '{{.Hostname}}'); do | |
echo -e "${NODE} - $(docker node inspect --format '{{.Status.Addr}}' "${NODE}")"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much.