Skip to content

Instantly share code, notes, and snippets.

@w7089
Last active September 16, 2021 11:22
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 w7089/06fe6a91c77b9d222d9b392bb386dd9c to your computer and use it in GitHub Desktop.
Save w7089/06fe6a91c77b9d222d9b392bb386dd9c to your computer and use it in GitHub Desktop.
extract docker container networks from docker inspect output
- Install jq
- To see docker container networks run:
docker inspect [container_id] | jq .[] | jq .NetworkSettings.Networks[]
This will give network ids.
- To see available networks with ids and names run docker network ls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment