Dockerで起動したUbuntuでrootユーザーであるにも関わらず、ip系コマンドを入力して、以下のように実行できない場合。。。
root@d7a6f6a495dd:/# ip netns add helloworld
mount --make-shared /var/run/netns failed: Operation not permitted
docker runのオプションである--privileged
を付与すると権限が与えられる
docker run --privileged -it -d --name ubuntu-test ubuntu:18.04
これでOK
root@d7a6f6a495dd:/# ip netns add helloworld
root@d7a6f6a495dd:/# ip netns list
helloworld