Last active
September 16, 2021 11:22
-
-
Save w7089/06fe6a91c77b9d222d9b392bb386dd9c to your computer and use it in GitHub Desktop.
extract docker container networks from docker inspect output
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
- 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