From 5e065a4c2e84ca2108f14da8619e995482ada282 Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Tue, 13 Jun 2017 17:57:14 -0400 Subject: [PATCH 1/9] Change FROM line for f26 branch --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6a61659..0f32e0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.fedoraproject.org/fedora:rawhide +FROM registry.fedoraproject.org/fedora:26 ENV VERSION=0 RELEASE=1 ARCH=x86_64 LABEL com.redhat.component="docker" \ From 5454857d03fb846d0c6d536e16fdf2d711279bab Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 7 Jul 2017 16:11:00 +0200 Subject: [PATCH 2/9] sync with upstream - fix some selinux labelling issues Signed-off-by: Giuseppe Scrivano (cherry picked from commit eecdfb94e1e59a815be7cf20e7e54e25a887ce7d) --- Dockerfile | 2 +- config.json.template | 4 ++-- init.sh | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f32e0a..0064ba6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:26 -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 12ff348c8c444a221e989ec2c22b669e31dd8dc5 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 25 Jul 2017 16:19:37 -0500 Subject: [PATCH 3/9] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0064ba6..7ba9845 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:26 -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" \ From 72de8d4dca33d25c43f5b4a470fb7fb64a3650dc Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 24 Aug 2017 16:56:41 -0500 Subject: [PATCH 4/9] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7ba9845..18c8491 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:26 -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" \ From dba5d017c868bdc2ce4abd0f95ba4a6f1f5c4abe Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Wed, 6 Sep 2017 15:30:44 -0400 Subject: [PATCH 5/9] Update f26 branch to master Also fix some naming issues. Signed-off-by: Yu Qi Zhang --- Dockerfile | 11 +++++++---- config.json.template | 13 +------------ daemon.json | 2 -- service.template | 1 + 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 18c8491..9f6774a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM registry.fedoraproject.org/fedora:26 -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" \ @@ -13,7 +13,8 @@ LABEL com.redhat.component="docker" \ 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 \ - && mkdir -p /usr/lib/modules && dnf clean all + && mkdir -p /usr/lib/modules /exports/hostfs/etc/docker \ + && dnf clean all RUN ln -s /usr/libexec/docker/docker-runc-current /usr/bin/docker-runc @@ -25,6 +26,8 @@ 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 +# Copy config if available +RUN (test -e /etc/oci-umount.conf && cp /etc/oci-umount.conf /exports/hostfs/etc) || true + CMD ["/usr/bin/init.sh"] diff --git a/config.json.template b/config.json.template index cd433c3..df3e4e5 100644 --- a/config.json.template +++ b/config.json.template @@ -295,17 +295,6 @@ "mode=755" ] }, - { - "type": "bind", - "source": "/usr/share/rhel", - "destination": "/usr/share/rhel", - "options": [ - "rprivate", - "rbind", - "ro", - "mode=755" - ] - }, { "type": "bind", "source": "${RUN_DIRECTORY}", @@ -381,7 +370,7 @@ ], "hooks": {}, "linux": { - "rootfsPropagation": "private", + "rootfsPropagation": "rslave", "resources": { "devices": [ { 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", diff --git a/service.template b/service.template index f7784d4..79835de 100644 --- a/service.template +++ b/service.template @@ -6,6 +6,7 @@ After=network.target EnvironmentFile=-/etc/sysconfig/docker-storage EnvironmentFile=-/etc/sysconfig/docker-network Environment=GOTRACEBACK=crash +SELinuxContext=system_u:system_r:container_runtime_t:s0 ExecStartPre=/bin/sh $DESTDIR/rootfs/set_mounts.sh ExecStartPre=/bin/bash -c 'export -p > /run/docker-bash-env' ExecStart=$EXEC_START From f49ace8371f437b5461c6e7a4bd76ca8bad15099 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 21 Sep 2017 14:25:08 -0500 Subject: [PATCH 6/9] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9f6774a..f2d9745 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:26 -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 83e09798b23030d0bbcc266fedea00571031ad3d Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 14 Nov 2017 14:18:41 -0600 Subject: [PATCH 7/9] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f2d9745..4ee72be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:26 -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 ab98aa7a0b64e0962dd7d48fe710a99fd71d0d36 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 14 Nov 2017 16:17:29 -0600 Subject: [PATCH 8/9] Bump Release for rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4ee72be..0a39e43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:26 -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" \ From 2510e98b37be6f348aa3c7ea2325f5c3a70b626d Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Thu, 15 Mar 2018 14:41:37 +0000 Subject: [PATCH 9/9] "Bump RELEASE for automatic rebuild" --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0a39e43..d0b2583 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:26 -ENV VERSION=0 RELEASE=8 ARCH=x86_64 +ENV VERSION=0 RELEASE=9 ARCH=x86_64 LABEL com.redhat.component="docker" \ name="$FGC/docker" \ version="$VERSION" \