-
-
Notifications
You must be signed in to change notification settings - Fork 113
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 support for setcap from build
command
#129
Conversation
3ddcd1a
to
2041209
Compare
See caddyserver/caddy#5270 where we made this change for Caddy
The old doumentation for |
Yeah, that was correct. I'm not sure I understand the question? It was only in The difference is |
Now I feel silly 😅 |
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.
Thanks for doing this, Francis! About this
But this purpose of the runBuild version is to run in Docker, which will be running as root. So having sudo would fail.
If I'm not mistaken, using sudo
while root will just executes the subsequent command normally without errors. Is there a special circumstance in Docker build env that would break it?
844a138
to
abceb1e
Compare
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.
Look great now. Thanks!
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.
Thanks! Good call on the LookPath too. Sounds like in most cases that should work without even needing to set the env var to toggle sudo.
7777280
to
c9f73d4
Compare
Fix #128
Haven't tested this yet. But it should be straight-forwards.
One detail I'm not sure how to handle is
sudo
. TherunDev
version of the code usessudo
by default, and that seems reasonable since a dev account is probably a regular user and not root. But this purpose of therunBuild
version is to run in Docker, which will be running as root. So havingsudo
would fail. I just added another env var to cover that case.Is there a better way to automatically detect whether
sudo
should be used? I'm not sure how that should be done from Go.