Skip to content

Instantly share code, notes, and snippets.

@Kasahs
Created June 10, 2019 08:04
Show Gist options
  • Save Kasahs/d2dd99d88fa047c8a42d55ac29a69901 to your computer and use it in GitHub Desktop.
Save Kasahs/d2dd99d88fa047c8a42d55ac29a69901 to your computer and use it in GitHub Desktop.
To disconnect all containers attached to a network
# 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