Преглед изворни кода

utils/docker-run: make it compatible with SELinux

After switching to a fresh Fedora 38 installation with SELinux disabled,
we noticed that utils/docker-run doesn't work as the applications
running inside the container are not allowed to accept the data mounted
through the bind mount.

Since we do not really need to isolate and confine the build, but rather
to provide a known environment, we don;t really need to enforce any
SELinux confinment in the container.

So, we tell docker to turn off label confinement for the container:

    https://manpages.org/docker-run

    --security-opt=[]
      Security Options
        [...]
        "label=disable"     : Turn off label confinement for the container

Suggested-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: use Antoine's proposal]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Yann E. MORIN пре 2 година
родитељ
комит
3b877dc7c2
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      utils/docker-run

+ 1 - 0
utils/docker-run

@@ -18,6 +18,7 @@ declare -a docker_opts=(
     --rm
     --rm
     --user "$(id -u):$(id -g)"
     --user "$(id -u):$(id -g)"
     --workdir "$(pwd)"
     --workdir "$(pwd)"
+    --security-opt label=disable
 )
 )
 
 
 declare -a mountpoints=(
 declare -a mountpoints=(