[github-issue/118] bugfix: files being created with root ownership; #119
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.
Some additional options were added to docker-run, to address a handful of permissions issues.
SELinux labels needed to be disabled, because the ones it inherited from the home directory didn't make any sense for use inside of a container; and with them enabled, a permission denied error resulted when attempting to read the makefile (which was a non-starter, as you can imagine).
Additionally, running the container as the user that started it is intended to ensure the files are owned by that user when they are created similarly for the effective group. This way, after the build is complete and the container has exited, the files that are the result of the build output aren't owned by root.
Besides telling docker-run to use a non-root user, it was also necessary add an option to the Dockerfile, to tell it the proper home directory to use (same as WORKDIR).
And the final change comes down to a matter of taste and style, so YMMV: short-form flags to docker-run were changed to their equivalent long-form. This was done because I feel it is better form to do so in the context of documentation (i.e., a README.md in this case). And short-form flags would not really save the user much typing, because they are most likely using the copy-to-clipboard widget anyway.
This is intended to address the following issue:
#118
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.