Docker: Only switch user if the current user is root#7654
Merged
fab-10 merged 4 commits intohyperledger:mainfrom Sep 23, 2024
Merged
Docker: Only switch user if the current user is root#7654fab-10 merged 4 commits intohyperledger:mainfrom
fab-10 merged 4 commits intohyperledger:mainfrom
Conversation
fab-10
reviewed
Sep 20, 2024
…nning as root Signed-off-by: Rafael Matias <rafael@skyle.net>
Signed-off-by: Rafael Matias <rafael@skyle.net>
fab-10
approved these changes
Sep 23, 2024
Wolmin
pushed a commit
to lukso-network/network-besu
that referenced
this pull request
Sep 27, 2024
* Update entrypoint script for Dockerfile to only switch user if its running as root Signed-off-by: Rafael Matias <rafael@skyle.net> * make root user check at the beginning Signed-off-by: Rafael Matias <rafael@skyle.net> --------- Signed-off-by: Rafael Matias <rafael@skyle.net> Signed-off-by: Wolmin <lamonos123@gmail.com>
This was referenced Oct 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One might be running the container without root (e.g.
docker run --user youruser ...), if that's the case you'll get an error like this when runningsu: