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:
@ -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
|
||||
|
Reference in New Issue
Block a user