Skip to content

Instantly share code, notes, and snippets.

@jbovet
Created March 11, 2018 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbovet/3cb048f08c4067c05326bd96627c37c1 to your computer and use it in GitHub Desktop.
Save jbovet/3cb048f08c4067c05326bd96627c37c1 to your computer and use it in GitHub Desktop.
Get IP address from docker nodes
#!/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