mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
Relabel test container volume contents for SELinux
To allow the tests to run from a host with SELinux enabled, the data needs to be relabeled to the correct SELinux contexts. Adding the `Z` label to the volume mount allows for this to occur. Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
This commit is contained in:
parent
9ec23a6286
commit
784a76c036
1 changed files with 5 additions and 5 deletions
|
@ -107,11 +107,11 @@ run_inside_image() {
|
|||
outfile=/tmp/${name}-${python_cmd}.out
|
||||
header $name
|
||||
|
||||
# --rm => remove container after run
|
||||
# -i => interactive
|
||||
# -t => tty
|
||||
# -v host:container:ro => mount host in container read-only
|
||||
docker_run="docker run --rm -i -t -v $PWD:/home/sandbox:ro"
|
||||
# --rm => remove container after run
|
||||
# -i => interactive
|
||||
# -t => tty
|
||||
# -v host:container:ro,Z => label the mount content read-only and with a private unshared label
|
||||
docker_run="docker run --rm -i -t -v $PWD:/home/sandbox:ro,Z"
|
||||
printf "%-40s: " $outfile >> $summary
|
||||
$docker_run $name $python_cmd ./runtests.py -vv 2>&1 | tee $outfile
|
||||
tail -1 $outfile >> $summary
|
||||
|
|
Loading…
Add table
Reference in a new issue