Last active
May 17, 2017 14:48
-
-
Save olymk2/fac0e449bc6fb8356846e54deda8f486 to your computer and use it in GitHub Desktop.
Docker Argos
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
#!/usr/bin/env bash | |
echo "Docker" | |
echo "---" | |
# http://stackoverflow.com/a/14853319 | |
TOP_OUTPUT=$(docker ps -q | xargs docker inspect --format="http://{{if ne \"\" .NetworkSettings.IPAddress}}{{ printf \"%.22s\" .NetworkSettings.IPAddress}}{{else}}{{range .NetworkSettings.Networks}}{{printf \"%.22s\" .IPAddress}}{{end}}{{end}} {{printf \"%.30s\" .Name}} | href=\"http://{{if ne \"\" .NetworkSettings.IPAddress}}{{ printf \"%.22s\" .NetworkSettings.IPAddress}}{{else}}{{range .NetworkSettings.Networks}}{{printf \"%.22s\" .IPAddress}}{{end}}{{end}}\"" | column -t -s@ -c 80) | |
echo "$TOP_OUTPUT | font=monospace bash=top useMarkup=true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment