Skip to content

Conversation

@pdelong42
Copy link

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.

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:

aws#118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant