-
Notifications
You must be signed in to change notification settings - Fork 379
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
Add manual overrides for container user namespaces. #891
Conversation
src/docker/shared.rs
Outdated
None | Some("auto") if !is_nerdctl => Some("host".to_string()), | ||
None | Some("auto") | Some("none") => None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.62 bool::then_some
would work nicely here
I don't know if we should explicitly support this. Maybe instead it should be more that the ContainerEngine is custom (i.e any random binary) edit: "this" being Lima, the ns stuff is good |
Maybe, we should probably at least support changing the user namespace, which would be necessary for lima support right now. But you're probably right: there's too many niche things here that can be covered in a more general case. Just keep the user namespace manual overrides, get rid of everything else? |
yep, sounds good to me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Support manual overrides of the container user namespace via the `CROSS_CONTAINER_USER_NAMESPACE` environment variable. If not set or set to `auto`, it will use the default value for the container engine (`host`). If `none` is provided, no `--userns` flag will be used. If any other value is provided, that will be the value passed to `--userns`. This is required for using lima/nerdctl, which currently does not support the `--userns` flag. Related to cross-rs#888.
bors r=Emilgardis |
Build succeeded: |
Support manual overrides of the container user namespace via the
CROSS_CONTAINER_USER_NAMESPACE
environment variable. If not set or set toauto
, it will use the default value for the container engine (host
). Ifnone
is provided, no--userns
flag will be used. If any other value is provided, that will be the value passed to--userns
.This is required for using lima/nerdctl, which currently does not support the
--userns
flag.Related to #888.