Makefile: Fix CONTAINER_OPTS for Fedora

Fedora based distributions don't use AppArmor but SELinux instead.
This change detects the distribution and sets the --security-opts
accordingly.

Signed-off-by: Sven Anderson <sven@redhat.com>
This commit is contained in:
Sven Anderson 2019-12-05 15:13:04 +01:00 committed by John Mulligan
parent 09b6977dc9
commit 1bc4d888b8
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
DOCKER_CI_IMAGE = go-ceph-ci
CONTAINER_CMD := docker
CONTAINER_OPTS := --security-opt apparmor:unconfined
CONTAINER_OPTS := --security-opt $(shell grep -q selinux /sys/kernel/security/lsm && echo "label=disabled" || echo "apparmor:unconfined")
VOLUME_FLAGS :=
SELINUX := $(shell getenforce 2>/dev/null)