diff --git a/Dockerfile b/Dockerfile index fa6bf65..769017f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0 RELEASE=1 ARCH=x86_64 +ENV VERSION=0 RELEASE=2 ARCH=x86_64 LABEL com.redhat.component="docker" \ name="docker" \ version="$VERSION" \ diff --git a/config.json.template b/config.json.template index 3ce615c..cd433c3 100644 --- a/config.json.template +++ b/config.json.template @@ -5,6 +5,7 @@ "arch": "amd64" }, "process": { + "selinuxLabel": "system_u:system_r:container_runtime_t:s0", "terminal": false, "user": { "uid": 0, @@ -393,7 +394,6 @@ { "type": "mount" } - ], - "selinuxProcessLabel": "system_u:system_r:container_runtime_t:s0" + ] } } diff --git a/init.sh b/init.sh index ac03b38..4347c47 100755 --- a/init.sh +++ b/init.sh @@ -1,5 +1,10 @@ #!/bin/bash +# Ensure that new process maintain this SELinux label +PID=$$ +LABEL=`tr -d '\000' < /proc/$PID/attr/current` +printf %s $LABEL > /proc/self/attr/exec + source /run/docker-bash-env # set storage first @@ -22,7 +27,7 @@ do sleep 0.1 done -# Run all the installed containers +# Run all the installed plugins mkdir -p /run/docker/plugins/ ls -1 /usr/libexec/docker/*plugin | \ while read i;