change SELinux label for EE volume mount

- The `z` option indicates that the bind mount content is shared among multiple containers.
- The `Z` option indicates that the bind mount content is private and unshared.

If multiple container attempt to mount the same directory `Z` option will cause a raise condition where only the last container started will have access to the file.

Ref: https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label
Signed-off-by: Hao Liu <haoli@redhat.com>
This commit is contained in:
Hao Liu 2022-05-04 21:31:24 -04:00
parent e3fe9010b7
commit d52d2af4b4

View File

@ -1451,8 +1451,8 @@ class RunProjectUpdate(BaseTask):
params.setdefault('container_volume_mounts', [])
params['container_volume_mounts'].extend(
[
f"{project_path}:{project_path}:Z",
f"{cache_path}:{cache_path}:Z",
f"{project_path}:{project_path}:z",
f"{cache_path}:{cache_path}:z",
]
)
return params