Skip to content

Instantly share code, notes, and snippets.

@yangyuqian
Created March 23, 2017 06:54
Show Gist options
  • Save yangyuqian/e205b1e320c6ffbe0b71c9ab439a39ee to your computer and use it in GitHub Desktop.
Save yangyuqian/e205b1e320c6ffbe0b71c9ab439a39ee to your computer and use it in GitHub Desktop.
Remove symlinks to docker containers, which created just for testing purpose
#!/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