run containers with the svn:svnusers
user instead of root
#67
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.
Instead of running the container as root, it's generally preferable to run with a different user.
The container already contains a
svn
user inside asvnusers
group:We can use this user, though I couldn't find information on what this user/group is meant for. Also it's not completely clear if the UID and GID are fixed. It would be troublesome if UID or GID changed in an image update (like it happed with Tor docker-obfs4-bridge).
An alternatively could be to use
USER 100:101
instead ofUSER svn:svnusers
.If we go with one of the above, it might be worth to consider moving the root directory to
/var/svn
(which is owned bysvn:svnusers
) as shown in thesvnserve
docs example.Another option is to create our own user with a large id.
PS. Just out of curiosity, is there a reason to have the test script in two places (
./test.sh
and./test/test.sh
)?