Jamesits / systemd-named-netns

Use named netns (net namespace) with systemd services!
GNU General Public License v3.0
132 stars 32 forks source link

docker/containerd in netns #29

Open antage opened 2 years ago

antage commented 2 years ago

Did anyone try to run docker.service/containerd.service with systemd-named-nets in own namespace?

I tried and commands like docker pull works fine but docker run can't start any container.

I hope someone knows a fix.

Jamesits commented 2 years ago

Docker must be able to manage net namespaces to work (unless you start every container with --network=host which I guess is not your use case). Thus Docker daemon itself cannot be in a net namespace.

There are a few workarounds I can think of:

I'll leave this issue open to see if anyone comes with a better idea.