-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Set unprivileged user to container image #2925
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
Set unprivileged user to container image #2925
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2925 +/- ##
=======================================
Coverage 91.53% 91.54%
=======================================
Files 463 463
Lines 22779 22779
=======================================
+ Hits 20851 20853 +2
+ Misses 1436 1435 -1
+ Partials 492 491 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
We probably need the same change on the core, and in all dockers (including examples)
I opened a PR for the core already: open-telemetry/opentelemetry-collector#2838 I did find other images for other purposes, like examples but wasn't sure those are published somewhere. |
They are not published, but we should still not build them as root correct? |
170d054
to
655674c
Compare
The problem isn't at build time, but at runtime. We should indeed provide the best image we can, even for examples, but I'd argue that those are not that critical and may potentially confuse users. In any case, I went through the one in this repo and did a couple of extra changes:
Let me know if you think those changes aren't desirable. |
@jpkrohling looks like examples failed to build:
|
655674c
to
ae38122
Compare
Dockerfile for the example fixed. |
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
ae38122
to
c78c3fd
Compare
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Juraci Paixão Kröhling [email protected]
Description: This change sets a custom user to the container image, under an ID that yields an unprivileged user.
Related PR: open-telemetry/opentelemetry-collector#2838