AppArmor is a hard requirement (#136)
This commit is contained in:
parent
fc0809a4c1
commit
b6e148c971
1 changed files with 1 additions and 8 deletions
|
@ -8,13 +8,6 @@ SUPERVISOR="$(jq --raw-output '.supervisor' ${CONFIG_FILE})"
|
||||||
MACHINE="$(jq --raw-output '.machine' ${CONFIG_FILE})"
|
MACHINE="$(jq --raw-output '.machine' ${CONFIG_FILE})"
|
||||||
DATA="$(jq --raw-output '.data // "/usr/share/hassio"' ${CONFIG_FILE})"
|
DATA="$(jq --raw-output '.data // "/usr/share/hassio"' ${CONFIG_FILE})"
|
||||||
|
|
||||||
# AppArmor Support
|
|
||||||
if command -v apparmor_parser > /dev/null 2>&1 && grep hassio-supervisor /sys/kernel/security/apparmor/profiles > /dev/null 2>&1; then
|
|
||||||
APPARMOR="--security-opt apparmor=hassio-supervisor"
|
|
||||||
else
|
|
||||||
APPARMOR="--security-opt apparmor:unconfined"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Init supervisor
|
# Init supervisor
|
||||||
HASSIO_DATA=${DATA}
|
HASSIO_DATA=${DATA}
|
||||||
HASSIO_IMAGE_ID=$(docker inspect --format='{{.Id}}' "${SUPERVISOR}")
|
HASSIO_IMAGE_ID=$(docker inspect --format='{{.Id}}' "${SUPERVISOR}")
|
||||||
|
@ -26,7 +19,7 @@ runSupervisor() {
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker run --name hassio_supervisor \
|
docker run --name hassio_supervisor \
|
||||||
--privileged \
|
--privileged \
|
||||||
$APPARMOR \
|
--security-opt apparmor=hassio-supervisor \
|
||||||
--security-opt seccomp=unconfined \
|
--security-opt seccomp=unconfined \
|
||||||
-v /run/docker.sock:/run/docker.sock \
|
-v /run/docker.sock:/run/docker.sock \
|
||||||
-v /run/dbus:/run/dbus \
|
-v /run/dbus:/run/dbus \
|
||||||
|
|
Loading…
Reference in a new issue