Created
March 11, 2018 23:19
-
-
Save jbovet/3cb048f08c4067c05326bd96627c37c1 to your computer and use it in GitHub Desktop.
Get IP address from docker nodes
This file contains 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
#!/bin/bash | |
docker node ls --format "{{.Hostname}}" | while read line ; do docker node inspect $line --format '{{ .Status.Addr }} - {{.Description.Hostname}}'; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment