Skip to content
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

support (per-container) user namespace remapping #23918

Open
geekodour opened this issue Sep 4, 2024 · 3 comments
Open

support (per-container) user namespace remapping #23918

geekodour opened this issue Sep 4, 2024 · 3 comments
Labels
hcc/jira stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/driver/docker type/enhancement

Comments

@geekodour
Copy link

I was wondering where would the feature of providing per container user-ns go in nomad?

Following are recent developments in k8s:

Mirantis/cri-dockerd#74
kubernetes/enhancements#127

Is it something nomad would like to support? if yes does it go in the docker driver or how would this roughly be implemented?

cc: @tgross

@tgross
Copy link
Member

tgross commented Sep 4, 2024

@geekodour isn't this configurable already in dockerd? https://docs.docker.com/engine/security/userns-remap/ In any case, yes, that'd be a task-driver specific configuration, so it'd need to get implemented for each task driver.

@geekodour
Copy link
Author

geekodour commented Sep 4, 2024

isn't this configurable already in dockerd

afaiu, userns-remap does it for all containers(a daemon config). and the --userns=host apparently just works as a disable namespace option when using using the userns-remap daemon option.

This feature is more about being able to assign a user-namespace at runtime to the container we want to run.

This has some historical info about it: moby/moby#27548

But I am unsure about the current status upstream aswell.

so it'd need to get implemented for each task driver.

I see, makes sense! I wonder how this plays out with podman

EDIT: podman does support this ootb, with --userns flag but I think it's not there in the nomad podman task driver yet.

@geekodour geekodour changed the title Support for user namespaces in Nomad Support for (per-container) user namespaces in Nomad Sep 5, 2024
@tgross
Copy link
Member

tgross commented Sep 6, 2024

Ok, I think I know why I was confused. The containers all run in their own user namespace. But it's the user remapping for the namespaces that you want to set individually per-container. Totally sensible. I'll mark this for roadmapping, but it might also be an interesting issue for someone to try to contribute from the community if one were so inclined.

@tgross tgross changed the title Support for (per-container) user namespaces in Nomad support (per-container) user namespace remapping Sep 6, 2024
@tgross tgross added the stage/accepted Confirmed, and intend to work on. No timeline committment though. label Sep 6, 2024
@tgross tgross moved this from Needs Triage to Needs Roadmapping in Nomad - Community Issues Triage Sep 6, 2024
@tgross tgross added the hcc/jira label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hcc/jira stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/driver/docker type/enhancement
Projects
Status: Needs Roadmapping
Development

No branches or pull requests

2 participants