docker: Set the home directory for the user#3676
Merged
muxator merged 1 commit intoether:developfrom Dec 2, 2019
Merged
Conversation
Contributor
|
I guess something like a It seems that the |
Contributor
Author
|
Interesting: Podman somehow made it work. However, it seems to work with Docker now: https://travis-ci.org/ether/etherpad-lite/jobs/619350446 |
9fa1522 to
6e14a8f
Compare
Before this change, the docker user had home in a directory it had no permissions on. The inability of creating a cache directory in `$HOME` prevented npm to work properly. Additionally, the `node_modules` in the base working directory had its owner set to root, preventing further changes. With this change, the `etherpad` user has a home directory. Additionally, `npm i` is now run by `etherpad` rather than the root user; this way, it is possible to dynamically change the `node_modules` content in day 2 operations. Note that while switching to the `useradd` builtin, a conflict was discovered with the GID 65534 that was previously used. This change is changing the `etherpad` user's UID to 5001 to avoid said conflict. As a consequence, a `chmod -R 5001:5001` must be run prior to attaching volumes created from previous Etherpad versions.
6e14a8f to
092d70e
Compare
Contributor
|
Queued, thanks |
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.
Before this change, the docker user had home in a directory it had no
permissions on. The inability of creating a cache directory in
$HOMEprevented npm to work properly.
Additionally, the
node_modulesin the base working directory had itsowner set to root, preventing further changes.
With this change, the
etherpaduser has a home directory.Additionally,
npm iis now run byetherpadrather than the rootuser; this way, it is possible to dynamically change the
node_modulescontent in day 2 operations.
Note that while switching to the
useraddbuiltin, a conflict wasdiscovered with the GID 65534 that was previously used. This change is
changing the
etherpaduser's UID to 5001 to avoid said conflict. As aconsequence, a
chmod -R 5001:5001must be run prior to attachingvolumes created from previous Etherpad versions.