Do not use netns as ID or for entropy

ContainerID is now required so use that
or generate random bytes.

Fixes #5
This commit is contained in:
Eugene Yakubovich
2015-05-05 13:35:20 -07:00
parent ed97604e74
commit b2d9801b25
9 changed files with 90 additions and 49 deletions

View File

@ -9,10 +9,10 @@ contid=$(docker run -d --net=none busybox:latest /bin/sleep 10000000)
pid=$(docker inspect -f '{{ .State.Pid }}' $contid)
netnspath=/proc/$pid/ns/net
./exec-plugins.sh add $netnspath
./exec-plugins.sh add $contid $netnspath
function cleanup() {
./exec-plugins.sh del $netnspath
./exec-plugins.sh del $contid $netnspath
docker kill $contid >/dev/null
}
trap cleanup EXIT