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

dockerenv.sh and sudo/root #639

Open
My1 opened this issue Oct 17, 2020 · 0 comments
Open

dockerenv.sh and sudo/root #639

My1 opened this issue Oct 17, 2020 · 0 comments
Labels
dev Developer related (non-product) issues good-first-issue Good for newcomers

Comments

@My1
Copy link
Contributor

My1 commented Oct 17, 2020

when running make dockerdev, which invokes scripts/dockerenv.sh as root via sudo or otherwise (because docker needs root and using the docker group does not seem to be a recommended option), when not having a running container already (if stopped, it will just ax the current and then create a new one) the command will fail when creating the docker user and group for the reason that at that point both the uid and gid are 0 for root and the created docker already has a root user.

also if calling make dockerdev after such a failure with the user/group creation it will fail again because it couldn't create the docker user it wants to jump into.

fixing this should not be TOO much of an issue:

when running make via sudo 2 extra variables will be created. $SUDO_UID and $SUDO_GID. if these are set one could just take these to replace the $(id -u) and $(id -g), and if docker is run as a pure root, we either need a different solution or ask to at least use it via a normal user through sudo or whatever

@x1ddos x1ddos added the dev Developer related (non-product) issues label Apr 12, 2021
@x1ddos x1ddos added the good-first-issue Good for newcomers label Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Developer related (non-product) issues good-first-issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants