-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Cannot create user namespaced container without network namespaces #799
Comments
This is a currently known restriction in the kernel that you cant mount I think the patch note is here: Also discussed a bit in moby/moby#21800 |
@dqminh But we're using user namespaces, so we have |
That's not quite true I think. You only have CAP_SYS_ADMIN in net namespace created by the user, not when you join net namespace of the host. |
Ah, you meant the user namespace that "owns" the net namespace. Okay, if that's the requirement for mounting all of I've removed /cc @davidlt |
Hmm it should work ( at least when i tested this a few weeks ago :p ). What did you use to test network access ? |
I was just using |
Seems to work, at least
I guess, I have to built an image with e.g. Docker and include wanted packages. |
Here is a better proof that it works. Is there a way to map
|
You can try bindmounting the file. You'd have to create the file in the |
The difficulty with unpriviledged net namespaces is with connecting $ unshare -nUfr sh To setup that connection, you need someone with priviledged access in In the absence of such a cooperative privileged user, you can still |
Yeah, need a privileged helper for setting up veth pair to host bridge. lxc also uses a privileged helper to setup networking for unprivileged containers called |
#807 adds a check to the validator to make sure that a user doesn't end up in this case. |
*: Use inline links for remaining internal references
Ran into a similar issue when runc is given a network namespace file. However it runs fine if either namespace file path or user namespace is removed from config.json. Is there a work around to use network namespace created in host namespace?
|
I discovered this while working on rootless containers. It looks like there's some issues using a non-network namespaced setup. This is also blocking rootless containers from having networking (since we need to just use host networking).
Here's the config, but the important thing to note is that I've added some dummy user namespace setup and removed the network section from
namespaces
.Blocking #774.
The text was updated successfully, but these errors were encountered: