app-emulation/docker: Add support for container init system
authorManuel Rüger <mrueg@gentoo.org>
Tue, 15 Nov 2016 11:14:43 +0000 (12:14 +0100)
committerManuel Rüger <mrueg@gentoo.org>
Tue, 15 Nov 2016 11:15:01 +0000 (12:15 +0100)
Package-Manager: portage-2.3.2

app-emulation/docker/docker-1.13.0_rc1.ebuild
app-emulation/docker/docker-9999.ebuild
app-emulation/docker/metadata.xml

index 32e517ec0d0c9020fd794e21db31c150a03f0038..85caf5fa6fecb2836bd8aed3bd96758b60db145c 100644 (file)
@@ -26,7 +26,7 @@ DESCRIPTION="The core functions you need to create Docker images and run Docker
 HOMEPAGE="https://dockerproject.org"
 LICENSE="Apache-2.0"
 SLOT="0"
-IUSE="apparmor aufs btrfs +device-mapper hardened overlay pkcs11 seccomp"
+IUSE="apparmor aufs btrfs +container-init +device-mapper hardened overlay pkcs11 seccomp"
 
 # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
 CDEPEND="
@@ -62,6 +62,7 @@ RDEPEND="
        >app-emulation/containerd-0.2.2
        app-emulation/runc[apparmor?,seccomp?]
        app-emulation/docker-proxy
+       container-init? ( >=sys-process/tini-0.13.0[static] )
 "
 
 RESTRICT="installsources strip"
@@ -243,6 +244,7 @@ src_install() {
        dosym containerd /usr/bin/docker-containerd
        dosym containerd-shim /usr/bin/docker-containerd-shim
        dosym runc /usr/bin/docker-runc
+       use container-init && dosym tini-static /usr/bin/docker-init
 
        newinitd contrib/init/openrc/docker.initd docker
        newconfd contrib/init/openrc/docker.confd docker
index f7e5a3337072978162c4787a87591d85a0285753..aaa79c9615b2bcf810c1a2424520aa4c237f737d 100644 (file)
@@ -26,7 +26,7 @@ DESCRIPTION="The core functions you need to create Docker images and run Docker
 HOMEPAGE="https://dockerproject.org"
 LICENSE="Apache-2.0"
 SLOT="0"
-IUSE="apparmor aufs btrfs +device-mapper hardened overlay pkcs11 seccomp"
+IUSE="apparmor aufs btrfs +container-init +device-mapper hardened overlay pkcs11 seccomp"
 
 # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
 CDEPEND="
@@ -62,6 +62,7 @@ RDEPEND="
        >app-emulation/containerd-0.2.2
        app-emulation/runc[apparmor?,seccomp?]
        app-emulation/docker-proxy
+       container-init? ( >=sys-process/tini-0.13.0[static] )
 "
 
 RESTRICT="installsources strip"
@@ -243,6 +244,7 @@ src_install() {
        dosym containerd /usr/bin/docker-containerd
        dosym containerd-shim /usr/bin/docker-containerd-shim
        dosym runc /usr/bin/docker-runc
+       use container-init && dosym tini-static /usr/bin/docker-init
 
        newinitd contrib/init/openrc/docker.initd docker
        newconfd contrib/init/openrc/docker.confd docker
index dbf678fa73dcd49d7de7a0c066d64321b334badf..1299d4143fd3ff449311cd1f281aa889ae7a7593 100644 (file)
                        Enables dependencies for the "btrfs" graph driver, including
                        necessary kernel flags.
                </flag>
+               <flag name="container-init">
+                       Makes the a staticly-linked init system tini available inside a
+                       container.
+               </flag>
                <flag name="device-mapper">
                        Enables dependencies for the "devicemapper" graph driver, including
                        necessary kernel flags.