Last active
September 26, 2017 15:29
-
-
Save tanasecosminromeo/3a31e980f00eebf746dd0d73a5451378 to your computer and use it in GitHub Desktop.
List all docker networks with their Gateway
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 ps -a --quiet "$@" | xargs --no-run-if-empty docker inspect --format='{{range $net, $conf := .NetworkSettings.Networks}}{{$conf.Gateway}} {{$net}}{{end}}' | column -t -s '|' | sort -u -V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment