How to check if my Linux support network namespace

Hi,

I want to practice network namespace but how can I check if my Linux support network namespace? If it doesn’t, can I install it?

The current version of official docker lab is Alpine. It seems that this linux doesn’t support namespace because when I run ip netns, it doesn’t return anything.

Thank you.

By default docker hides namespaces, so try to do this

$ sudo docker inspect -f '{{.State.Pid}}' ctn-1
44356

$ ln -s /proc/44356/ns/net /var/run/netns/44356
$ ip netns list
44356