Closed alexhaydock closed 6 years ago
Nice! Thanks for pointing this out. I'm not familiar with selinux and have been deferring to those more experienced for a solution here. I'll add this to the README, unless you'd like to make a PR explaining this.
@nevergone this work in your environment?
Updated in 6ed46f18
Thank you for your work on this useful container.
In your README for this repo, you suggest that users disable SELinux using the
setenforce 0
command, and manually change SELinux contexts usingchcon
.This is unnecessary and (in the case of disabling SELinux) opens users up to risk.
Docker bind mounts have an inbuilt mechanism for automatically setting SELinux contexts on bind mounted directories.
In the case of this container,
:Z
could be added to the bind mount to make the recommendations from the README file unnecessary:As noted by the Docker documentation, using
:Z
will automatically set SELinux labels for the mount directory that allow it to be used just with the container in question.(The lowercase
:z
can also be used for situations where the directory will be mounted and shared between multiple containers, but I don't see that as being necessary here.)Thanks again for this project. :+1: