Skip to content

Instantly share code, notes, and snippets.

@dasgoll
Created September 21, 2014 07:17
Show Gist options
  • Save dasgoll/28c5571b84f6d633a70f to your computer and use it in GitHub Desktop.
Save dasgoll/28c5571b84f6d633a70f to your computer and use it in GitHub Desktop.
[root@centos65vm1 man1]# docker inspect -f '{{ json .NetworkSettings }}' busygoll
{"Bridge":"docker0","Gateway":"172.17.42.1","IPAddress":"172.17.0.2","IPPrefixLen":16,"PortMapping":null,"Ports":{}}
[root@centos65vm1 man1]# docker inspect -f '{{ json .NetworkSettings }}' busygoll | python -mjson.tool
{
"Bridge": "docker0",
"Gateway": "172.17.42.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"PortMapping": null,
"Ports": {}
}
## to color the output
docker inspect -f '{{ json .NetworkSettings }}' busygoll | python -mjson.tool | jq '.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment