Created
March 23, 2017 06:54
-
-
Save yangyuqian/e205b1e320c6ffbe0b71c9ab439a39ee to your computer and use it in GitHub Desktop.
Remove symlinks to docker containers, which created just for testing purpose
This file contains 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
#!/bin/bash | |
container_ids=`docker ps -aq` | |
for cid in $container_ids | |
do | |
pid=`docker inspect -f '{{.State.Pid}}' $cid` | |
if [ -f "/var/run/netns/$cid" ]; then | |
rm /var/run/netns/$cid | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment