I'm getting an error when creating a network namespace inside a docker container saying permission denied.
command
ip netns add red
error
mount --make-shared /run/netns failed: Permission denied
I am running an image ubuntu:20.10 and tried by adding specific capabilities to the container and it did not help.
docker run -it --rm --name=ubuntu --cap-add CAP_SYS_ADMIN --cap-add NET_ADMIN ubuntu:20.10
apt-get update && apt-get install -y net-tools && apt-get install -y iproute2
Even after adding all capabilities issue remain same.
docker run -it --rm --name=ubuntu --cap-add ALL ubuntu:20.10
