-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to get namespace using GetFromDocker #27
Comments
You should be able to use GetFromPath instead of GetFromDocker. Have a look at https://github.com/vishvananda/netns/blob/master/netns_linux.go:
You should be able to get the namespace from |
Issue seen: Unable to find container Github: vishvananda/netns#27
Issue seen: Unable to find container Github: vishvananda/netns#27
My Docker version uses the Docker network sandbox id as identifiers in E.g. CONTAINER="my_container"
SANDBOX_ID=$(docker inspect ${CONTAINER} | jq .[0].NetworkSettings.SandboxID[:12])
NETNS=/var/run/docker/netns/${SANDBOX_ID} |
Seems like the following is easier
|
Hello, when I try to get namespace from a docker container by its id function call fails with:
But if I run
docker inspect
for this ID docker finds this container. Anything I am doing wrong?The text was updated successfully, but these errors were encountered: