Reduce need for privileged mode a bit more #46
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.
Currently the general advise is to just use privileged mode with docker/compose. From a security point of view this is obviously undesirable.
One reason why privileged mode is needed, is because some packages 0 incorrectly set permissions on their (
-rwxr-x--- 501:staff package.json) file. One would rightfully argue, that this doesn't matter, because docker runs as root and thus all permissions are granted anyway. However when working with volumes, this is no longer true, the docker user is mapped to some random UID and within our container we now get a permission denied error, because our remapped root user no longer has access.While we obviously should aim to fix this error upstream wherever possible, this could take years. Meanwhile lets put the root user into the
staffgroup, which seems to be the permissions set by these misbehaving packages. Obviously this will break again once upstream or debian changes the mapping/permission at a later time.