-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[FAST_BUILD] No sudo when run with rootless triplet #2132
[FAST_BUILD] No sudo when run with rootless triplet #2132
Conversation
- rootless triplet: -e NB_USER=root -e NB_UID=0 -e NB_GID=0
@mathbunnyru For edge cases like which require |
@benz0li may I ask you to write a test for this? |
Done. |
environment=["NB_USER=root", "NB_UID=0", "NB_GID=0"], | ||
command=["env"], | ||
) | ||
assert "SUDO" not in logs |
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.
Why is this in capital letters?
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.
To check if any of
SUDO_GID=0
SUDO_COMMAND=/usr/local/bin/start-notebook.py
SUDO_USER=root
SUDO_UID=0
is set in the environment.
That is the case, when the container is started with sudo
– but should not in this case.
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.
Got it, thanks!
Thanks, @benz0li 👍 |
-e NB_USER=root
-e NB_UID=0
-e NB_GID=0
Issue ticket if applicable
Checklist (especially for first-time contributors)