Created
June 10, 2019 08:04
-
-
Save Kasahs/d2dd99d88fa047c8a42d55ac29a69901 to your computer and use it in GitHub Desktop.
To disconnect all containers attached to a network
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
# to disconnect all containers attached to a network | |
for i in ` docker network inspect -f '{{range .Containers}}{{.Name}} {{end}}' network_name`; do docker network disconnect -f network_name $i; done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment