-
install SELinux-dockersock if you need to allow containers to access
docker.sock
-
add the z: or Z: option to any host->container volume mappings (i.e.
-v /host-dir:/container_dir:Z
as part of arun
command or asoptions: ["z"]
or["Z"]
in a yaml config file)
The following (and summary above) reflects the results of my efforts to give a Jenkins container (that is, a container running Jenkins) a spin while running in an SELinux environment, which is the default for CentOS and RHEL 7. For those not familiar with SELinux, there are plenty of resources out there to explain it in great depth. Suffice it to say that it is a rich and robust Mandatory Access Control security layer that, by design, places a lot of restrictions on what can be accessed by a user/application. In this particular case, there were two SELinux gotchas that in