Skip to content

Instantly share code, notes, and snippets.

@kevinswiber
Created December 2, 2013 21:34
Show Gist options
  • Save kevinswiber/7759460 to your computer and use it in GitHub Desktop.
Save kevinswiber/7759460 to your computer and use it in GitHub Desktop.
Kill Docker containers and reset iptables
docker ps | grep node | awk '{ print $1 }' | xargs docker stop
docker ps -a | grep node | awk '{ print $1 }' | xargs docker rm
sudo iptables -S | grep docker0.*ACCEPT | awk '{ gsub("-A", "sudo iptables -D", $0); print $0 }' | xargs -0 /bin/bash -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment