-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[REVERT][REVERRT] Add group and user in dockerfile to run container as unprivileged #502
Conversation
✔️ Deploy Preview for dashy-dev ready! 🔨 Explore the source changes: 39dbb4c 🔍 Inspect the deploy log: https://app.netlify.com/sites/dashy-dev/deploys/6212c4e69a4b220008d6cd09 😎 Browse the preview: https://deploy-preview-502--dashy-dev.netlify.app |
Changes preview: |
This PR is stale because it has been open 6 weeks with no activity. Either remove the stale label or comment below with a short update, otherwise this PR will be closed in 5 days. |
WORKDIR ${DIRECTORY} | ||
|
||
# Copy built application from build phase | ||
COPY --from=BUILD_IMAGE --chown=${USER}:${USER} /app ./ |
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.
COPY --from=BUILD_IMAGE --chown=${USER}:${USER} /app ./ | |
COPY --from=BUILD_IMAGE /app ./ |
As long as the code doesn't need permissions to modify the source itself, I'd set the permissions so root owns the files and everyone else can read them (644). Otherwise, if there was a way for someone to take over the node process, they could add their own files and/or modify the source code.
In my testing to run Dashy in my Kubernetes cluster, I can't get the app to run as a non-root user. There are two main issues:
I'm not sure the changes in this PR would fix the second issue. |
This PR is stale because it has been open 6 weeks with no activity. Either remove the stale label or comment below with a short update, otherwise this PR will be closed in 5 days. |
Did your 2nd point ever get resolved? I have this same behavior on 3.1.1 when setting runAsNonRoot |
PR to re-apply @Singebob's changes originally released in #495.
There was an issue that caused breaking changes for users, as raised in #498 and #499
Before merging, I need to either fix this, or update the documentation appropriately.