From 47c808132e102b53a7c371171e2f345d3951450b Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Tue, 13 Jun 2017 17:40:00 -0400 Subject: [PATCH 1/8] Change FROM line for f25 branch --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6a61659..fa6bf65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.fedoraproject.org/fedora:rawhide +FROM registry.fedoraproject.org/fedora:25 ENV VERSION=0 RELEASE=1 ARCH=x86_64 LABEL com.redhat.component="docker" \ From eecdfb94e1e59a815be7cf20e7e54e25a887ce7d Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 7 Jul 2017 16:11:00 +0200 Subject: [PATCH 2/8] sync with upstream - fix some selinux labelling issues Signed-off-by: Giuseppe Scrivano --- Dockerfile | 2 +- config.json.template | 4 ++-- init.sh | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) 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; From 4980aeed2945d7bc69d32d8bad7b6cd19fee3e43 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 7 Jul 2017 16:22:54 +0200 Subject: [PATCH 3/8] f25: there is no container-storage-setup, drop it Signed-off-by: Giuseppe Scrivano --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 769017f..794b8d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0 RELEASE=2 ARCH=x86_64 +ENV VERSION=0 RELEASE=3 ARCH=x86_64 LABEL com.redhat.component="docker" \ name="docker" \ version="$VERSION" \ @@ -11,8 +11,8 @@ LABEL com.redhat.component="docker" \ maintainer="Giuseppe Scrivano " \ atomic.type="system" -RUN dnf install --setopt=tsflags=nodocs -y docker container-storage-setup container-selinux cloud-utils-growpart python-docker-py docker-novolume-plugin lvm2 iptables procps-ng xz oci-register-machine \ - && rpm -V docker container-storage-setup container-selinux cloud-utils-growpart python-docker-py docker-novolume-plugin lvm2 iptables procps-ng xz oci-register-machine \ +RUN dnf install --setopt=tsflags=nodocs -y docker container-selinux cloud-utils-growpart python-docker-py docker-novolume-plugin lvm2 iptables procps-ng xz oci-register-machine \ + && rpm -V docker container-selinux cloud-utils-growpart python-docker-py docker-novolume-plugin lvm2 iptables procps-ng xz oci-register-machine \ && mkdir -p /usr/lib/modules && dnf clean all RUN ln -s /usr/libexec/docker/docker-runc-current /usr/bin/docker-runc From 150b7d4f25e834254e19a8ac597859de037a1f69 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 7 Jul 2017 16:34:01 +0200 Subject: [PATCH 4/8] f25: check if oci-umount.conf exists before copying it Signed-off-by: Giuseppe Scrivano --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 794b8d3..45fb543 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0 RELEASE=3 ARCH=x86_64 +ENV VERSION=0 RELEASE=4 ARCH=x86_64 LABEL com.redhat.component="docker" \ name="docker" \ version="$VERSION" \ @@ -25,6 +25,6 @@ COPY set_mounts.sh / COPY config.json.template service.template tmpfiles.template /exports/ COPY daemon.json /exports/hostfs/etc/docker/container-daemon.json # https://github.com/rhatdan/oci-umount/issues/2 -RUN cp /etc/oci-umount.conf /exports/hostfs/etc +RUN (test -e /etc/oci-umount.conf && cp /etc/oci-umount.conf /exports/hostfs/etc) || true CMD ["/usr/bin/init.sh"] From b61c9083df2cb00c06a09660b8e333710850fd6d Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Mon, 10 Jul 2017 10:58:04 -0400 Subject: [PATCH 5/8] Minor fixes for f25 Change "name" label to be the correct format, and remove a rhel plugin. Signed-off-by: Yu Qi Zhang --- Dockerfile | 4 ++-- daemon.json | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45fb543..fb2890f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0 RELEASE=4 ARCH=x86_64 +ENV VERSION=0 RELEASE=5 ARCH=x86_64 LABEL com.redhat.component="docker" \ - name="docker" \ + name="$FGC/docker" \ version="$VERSION" \ release="$RELEASE.$DISTTAG" \ architecture="$ARCH" \ diff --git a/daemon.json b/daemon.json index ea5e789..445fe8a 100644 --- a/daemon.json +++ b/daemon.json @@ -1,6 +1,4 @@ - { - "authorization-plugins": ["rhel-push-plugin"], "default-runtime": "oci", "containerd": "/run/containerd.sock", "userland-proxy-path": "/usr/libexec/docker/docker-proxy-current", From e1f49fb44d3f29640d57b83e88561abea3c7c53d Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 25 Jul 2017 12:56:38 -0500 Subject: [PATCH 6/8] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fb2890f..a34b274 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0 RELEASE=5 ARCH=x86_64 +ENV VERSION=0 RELEASE=6 ARCH=x86_64 LABEL com.redhat.component="docker" \ name="$FGC/docker" \ version="$VERSION" \ From c835099d3fd5f11d4ec0a62d38f88e43d2e1dc00 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 24 Aug 2017 15:46:06 -0500 Subject: [PATCH 7/8] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a34b274..4b6ba49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0 RELEASE=6 ARCH=x86_64 +ENV VERSION=0 RELEASE=7 ARCH=x86_64 LABEL com.redhat.component="docker" \ name="$FGC/docker" \ version="$VERSION" \ From 8f9a517b6b85bcc55739a639f23fdc2b4fd85eae Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 21 Sep 2017 10:33:10 -0500 Subject: [PATCH 8/8] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4b6ba49..377bf7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0 RELEASE=7 ARCH=x86_64 +ENV VERSION=0 RELEASE=8 ARCH=x86_64 LABEL com.redhat.component="docker" \ name="$FGC/docker" \ version="$VERSION" \