Handle correct mounting of volumes in SELinux enabled systems.#3
Handle correct mounting of volumes in SELinux enabled systems.#3sebaschi wants to merge 2 commits intovusec:mainfrom
Conversation
Fixed: SELinux label was added to docker build options instead of to the mount options specified when running
|
Where did you find docker docks for Aside from that this LGTM. |
|
I'm now unsure that this is the correct way when using docker. The In any case, both podman and docker agree that the correct way to do this is by mounting a hostvolume with an added In the podman-run (and docker-run) man page, it states that "These suffixes tell Podman to relabel file objects on the shared volumes. The z option tells Podman that two or more containers share the volume content. As a result, podman labels the content with a shared content label." On podman, using "--volume /HOST-DIR:/CONTAINER-DIR" uses a bind mount. Taken together, I reason that using "--mount type=bind, relabel=shared" should have the same semantics. |
On SELinux enabled systems we need extra labels when mounting volumes to avoid issues with ownership.