What do the `:z` and `:Z` mount options do?
AdvancedConceptVolumes & Bind Mounts
Answer
On SELinux-enforcing hosts (RHEL, Fedora) a container process cannot access arbitrary host files. :z relabels the content with a shared label (svirt_sandbox_file_t) usable by multiple containers; :Z applies a private label unique to this container. Never relabel /home or /etc wholesale.
More on Volumes & Bind Mounts
What are the three ways to persist or share data with a container?BeginnerVolume vs bind mount: when do you pick which?BeginnerWhat is the difference between `-v` and `--mount`?BeginnerWhat is an anonymous volume and how do you find leftovers?IntermediateHow does a new named volume get populated?IntermediateHow do you back up and restore a named volume?Intermediate