summaryrefslogtreecommitdiff
path: root/app-emulation/docker
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/docker')
-rw-r--r--app-emulation/docker/ChangeLog152
-rw-r--r--app-emulation/docker/ChangeLog-2015283
-rw-r--r--app-emulation/docker/Manifest1
-rw-r--r--app-emulation/docker/docker-1.7.1.ebuild268
-rw-r--r--app-emulation/docker/files/15404-fix-go14_15.patch85
-rw-r--r--app-emulation/docker/files/18074-disable-journald-arm.patch30
-rw-r--r--app-emulation/docker/files/7179-add-audit_write-cap.patch29
-rw-r--r--app-emulation/docker/files/docker-1.7.1-service-patch.patch12
-rw-r--r--app-emulation/docker/files/docker-r2.confd18
-rw-r--r--app-emulation/docker/files/docker-r2.initd54
-rw-r--r--app-emulation/docker/files/docker-r3.confd13
-rw-r--r--app-emulation/docker/files/docker-r3.initd31
-rw-r--r--app-emulation/docker/files/docker.initd31
-rw-r--r--app-emulation/docker/files/docker.service13
14 files changed, 1020 insertions, 0 deletions
diff --git a/app-emulation/docker/ChangeLog b/app-emulation/docker/ChangeLog
new file mode 100644
index 00000000..521e992b
--- /dev/null
+++ b/app-emulation/docker/ChangeLog
@@ -0,0 +1,152 @@
+# ChangeLog for app-emulation/docker
+# Copyright 1999-2016 Gentoo Foundation; Distributed under the GPL v2
+# (auto-generated from git log)
+
+*docker-1.7.1 (09 Aug 2015)
+*docker-1.6.2 (09 Aug 2015)
+*docker-1.6.1 (09 Aug 2015)
+
+ 09 Aug 2015; Robin H. Johnson <robbat2@gentoo.org> +docker-1.6.1.ebuild,
+ +docker-1.6.2.ebuild, +docker-1.7.1.ebuild,
+ +files/7179-add-audit_write-cap.patch, +files/docker-r2.confd,
+ +files/docker-r2.initd, +files/docker-r3.confd, +files/docker-r3.initd,
+ +files/docker.initd, +files/docker.service, +metadata.xml:
+ proj/gentoo: Initial commit
+
+ This commit represents a new era for Gentoo:
+ Storing the gentoo-x86 tree in Git, as converted from CVS.
+
+ This commit is the start of the NEW history.
+ Any historical data is intended to be grafted onto this point.
+
+ Creation process:
+ 1. Take final CVS checkout snapshot
+ 2. Remove ALL ChangeLog* files
+ 3. Transform all Manifests to thin
+ 4. Remove empty Manifests
+ 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
+ 5.1. Do not touch files with -kb/-ko keyword flags.
+
+ Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+ X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration
+ tests
+ X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this
+ project
+ X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo
+ developer, wrote Git features for the migration
+ X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve
+ cvs2svn
+ X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
+ X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014
+ work in migration
+ X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
+ X-Thanks: All of other Gentoo developers - many ideas and lots of paint on
+ the bikeshed
+
+ 09 Aug 2015; Ulrich Müller <ulm@gentoo.org> files/docker-r2.initd,
+ files/docker-r3.initd, files/docker.initd:
+ [QA] Remove executable bit from files, bug 550434.
+
+ 24 Aug 2015; Justin Lecher <jlec@gentoo.org> metadata.xml:
+ Use https by default
+
+ Convert all URLs for sites supporting encrypted connections from http to
+ https
+
+ Signed-off-by: Justin Lecher <jlec@gentoo.org>
+
+ 24 Aug 2015; Mike Gilbert <floppym@gentoo.org> metadata.xml:
+ Revert DOCTYPE SYSTEM https changes in metadata.xml
+
+ repoman does not yet accept the https version.
+ This partially reverts eaaface92ee81f30a6ac66fe7acbcc42c00dc450.
+
+ Bug: https://bugs.gentoo.org/552720
+
+ 25 Aug 2015; William Hubbs <williamh@gentoo.org> metadata.xml:
+ add myself as a maintainer
+
+ This was approved by both alunduil and xarthisius.
+
+*docker-1.8.1 (25 Aug 2015)
+
+ 25 Aug 2015; William Hubbs <williamh@gentoo.org> +docker-1.8.1.ebuild:
+ version bump for 1.8.1
+
+ This is for bug #557972.
+
+*docker-9999 (25 Aug 2015)
+
+ 25 Aug 2015; William Hubbs <williamh@gentoo.org> +docker-9999.ebuild:
+ add live ebuild
+
+ 27 Aug 2015; Kacper Kowalik <xarthisius@gentoo.org> docker-1.8.1.ebuild,
+ +files/15404-fix-go14_15.patch:
+ Apply upstream patch fixing issue with go>=1.4. Fixes #558344
+
+ Package-Manager: portage-2.2.20
+
+ 19 Sep 2015; Agostino Sarubbo <ago@gentoo.org> docker-1.7.1.ebuild:
+ amd64 stable wrt bug #550894
+
+ Package-Manager: portage-2.2.20.1
+ RepoMan-Options: --include-arches="amd64"
+
+*docker-1.8.2 (28 Sep 2015)
+
+ 28 Sep 2015; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.8.2.ebuild:
+ Version bump for 1.8.2. Ebuild ported from Tianon's overlay
+
+ Package-Manager: portage-2.2.20
+
+ 29 Sep 2015; Justin Lecher <jlec@gentoo.org> docker-1.8.2.ebuild:
+ Apply compat patch for go-1.5
+
+ Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=558344
+
+ Package-Manager: portage-2.2.22
+ Signed-off-by: Justin Lecher <jlec@gentoo.org>
+
+ 29 Sep 2015; Justin Lecher <jlec@gentoo.org> docker-1.6.2.ebuild,
+ docker-1.7.1.ebuild, docker-1.8.2.ebuild, docker-9999.ebuild:
+ Inherit eutils.eclass for epatch_user
+
+ Package-Manager: portage-2.2.22
+ Signed-off-by: Justin Lecher <jlec@gentoo.org>
+
+*docker-1.9.0 (03 Nov 2015)
+
+ 03 Nov 2015; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.9.0.ebuild:
+ version bump to 1.9.0. Ebuild ported from Tianon's overlay
+
+ Package-Manager: portage-2.2.20
+
+*docker-1.9.1 (24 Nov 2015)
+
+ 24 Nov 2015; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.9.1.ebuild,
+ +files/18074-disable-journald-arm.patch:
+ version bump, fixes #566432
+
+ 24 Jan 2016; Michał Górny <mgorny@gentoo.org> metadata.xml:
+ Replace all herds with appropriate projects (GLEP 67)
+
+ Replace all uses of herd with appropriate project maintainers, or no
+ maintainers in case of herds requested to be disbanded.
+
+ 24 Jan 2016; Michał Górny <mgorny@gentoo.org> metadata.xml:
+ Set appropriate maintainer types in metadata.xml (GLEP 67)
+
+*docker-1.10.0 (08 Feb 2016)
+
+ 08 Feb 2016; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.10.0.ebuild:
+ version bump to 1.10.0
+
+ Fixes bug 574086 reported by RAPHEAD <raphead@gmx.net>
+ Ported from Tianon's overlay with following modifications:
+
+ * dropped ~arm ~x86 keywords
+ * simplified gcc-specs-pie sed invocation
+ * moved libseccomp to CDEPEND (*.h required for build)
+
+ Package-Manager: portage-2.2.27
+
diff --git a/app-emulation/docker/ChangeLog-2015 b/app-emulation/docker/ChangeLog-2015
new file mode 100644
index 00000000..477d682e
--- /dev/null
+++ b/app-emulation/docker/ChangeLog-2015
@@ -0,0 +1,283 @@
+# ChangeLog for app-emulation/docker
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/docker/ChangeLog,v 1.58 2015/08/07 04:53:18 vapier Exp $
+
+ 07 Aug 2015; Mike Frysinger <vapier@gentoo.org> docker-1.7.1.ebuild:
+ Make UTS_NS check non-fatal too #555434 by Deniss Gaplevsky.
+
+ 28 Jul 2015; Kacper Kowalik <xarthisius@gentoo.org> docker-1.7.1.ebuild:
+ Make kernel checks non fatal. Thanks to Tianon <admwiggin@gmail.com> for the
+ patch. Fixes #555434 by Deniss Gaplevsky <slim@inbox.lv>
+
+*docker-1.7.1 (24 Jul 2015)
+
+ 24 Jul 2015; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.7.1.ebuild,
+ -docker-1.7.0-r1.ebuild, -docker-1.7.0.ebuild:
+ Version bump, grabbed from tianon's docker overlay. Fixes #554306. Drop old
+
+*docker-1.7.0-r1 (07 Jul 2015)
+
+ 07 Jul 2015; William Hubbs <williamh@gentoo.org> +docker-1.7.0-r1.ebuild:
+ add slot dependency on dev-lang/go, approved by all maintainers
+
+ 05 Jul 2015; Manuel Rüger <mrueg@gentoo.org> docker-1.6.2.ebuild,
+ docker-1.7.0.ebuild:
+ [QA] Install zsh-completion unconditionally.
+
+*docker-1.7.0 (04 Jul 2015)
+
+ 04 Jul 2015; Alex Brandt <alunduil@gentoo.org> +docker-1.7.0.ebuild,
+ files/docker-r2.confd, files/docker.initd, metadata.xml:
+ add version 1.7.0 * from tianon's docker-overlay * fixes bug #553708
+
+*docker-1.6.2 (04 Jul 2015)
+
+ 04 Jul 2015; Alex Brandt <alunduil@gentoo.org> +docker-1.6.2.ebuild,
+ +files/7179-add-audit_write-cap.patch, +files/docker-r3.confd,
+ +files/docker-r3.initd, +files/docker.initd, files/docker-r2.confd,
+ files/docker-r2.initd, files/docker.service:
+ add version 1.6.2 fixes bug #553706
+
+ 04 Jul 2015; Alex Brandt <alunduil@gentoo.org> metadata.xml:
+ add alunduil to maintainers
+
+ 30 Jun 2015; Manuel Rüger <mrueg@gentoo.org> docker-1.6.1.ebuild:
+ Install zsh-completions unconditionally.
+
+ 07 Jun 2015; Justin Lecher <jlec@gentoo.org> docker-1.6.1.ebuild:
+ Add missing eclass
+
+ 07 Jun 2015; Justin Lecher <jlec@gentoo.org> metadata.xml:
+ Add github to remote-id in metadata.xml
+
+ 08 May 2015; Kacper Kowalik <xarthisius@gentoo.org> -docker-1.5.0.ebuild:
+ drop old wrt #548884
+
+*docker-1.6.1 (08 May 2015)
+
+ 08 May 2015; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.6.1.ebuild,
+ -docker-1.6.0.ebuild:
+ Version bump, drop old wrt #548884
+
+ 04 May 2015; Justin Lecher <jlec@gentoo.org> docker-1.6.0.ebuild:
+ Add missing dependency on aufs4, thanks jbergstroem for the report
+
+ 29 Apr 2015; Kacper Kowalik <xarthisius@gentoo.org> docker-1.6.0.ebuild:
+ Drop ~CFS_BANDWIDTH as it's not yet used by 1.6.0, add warning message for
+ CONFIG_MEMCG_SWAP_ENABLED. Thanks to Thomas Capricelli for the report
+
+*docker-1.6.0 (28 Apr 2015)
+
+ 28 Apr 2015; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.6.0.ebuild:
+ Version bump, grabbed from tianon's docker overlay. Fixes #547316
+
+ 14 Mar 2015; Kacper Kowalik <xarthisius@gentoo.org> docker-1.5.0.ebuild:
+ Check if CPUSETS are enabled in kernel wrt bug #536546 by Dirk Best <mail
+ @dirk-best.de>. Thanks to Tianon <admwiggin@gmail.com> for reporting and
+ fixing it upstream
+
+ 03 Mar 2015; Kacper Kowalik <xarthisius@gentoo.org> docker-1.5.0.ebuild,
+ metadata.xml:
+ Port changes from Tianon's overlay. Fixes bug #541742 by Thomas Capricelli
+ <orzel@freehackers.org>
+
+ 19 Feb 2015; Patrick Lauer <patrick@gentoo.org> -docker-1.3.3-r1.ebuild,
+ -docker-1.4.1.ebuild:
+ Remove old versions with unsatisfiable dependencies
+
+ 15 Feb 2015; Patrick Lauer <patrick@gentoo.org> docker-1.3.3-r1.ebuild,
+ docker-1.4.1.ebuild, docker-1.5.0.ebuild:
+ Make kernel checks nonfatal to allow building (binpkgs etc.)
+
+*docker-1.5.0 (11 Feb 2015)
+
+ 11 Feb 2015; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.5.0.ebuild:
+ Version bump, grabbed from tianon's docker overlay
+
+*docker-1.4.1 (23 Dec 2014)
+
+ 23 Dec 2014; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.4.1.ebuild,
+ -docker-1.4.0.ebuild:
+ Version bump, drop old
+
+*docker-1.3.3-r1 (16 Dec 2014)
+
+ 16 Dec 2014; Alex Brandt <alunduil@gentoo.org> +docker-1.3.3-r1.ebuild:
+ add version 1.3.3-r1 from tianon's docker overlay
+
+ Version 1.4.0 of docker has a nasty bug when using volumes that are bind
+ mounts. Thus, I've added 1.3.3-r1 until 1.4.1 is released and fixes this
+ issue, or longer that's OK too.
+
+*docker-1.4.0 (12 Dec 2014)
+
+ 12 Dec 2014; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.4.0.ebuild,
+ -docker-1.3.2.ebuild:
+ Version bump, drop vulnerable versions wrt #532344
+
+ 26 Nov 2014; Kacper Kowalik <xarthisius@gentoo.org> docker-1.3.2.ebuild:
+ Update with ebuild from Tianon's overlay
+
+ 26 Nov 2014; Kacper Kowalik <xarthisius@gentoo.org> metadata.xml:
+ Add myself as co-maintainer
+
+*docker-1.3.2 (26 Nov 2014)
+
+ 26 Nov 2014; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.3.2.ebuild,
+ -docker-1.3.1.ebuild:
+ Version bump, drop old wrt bug #530518
+
+ 19 Nov 2014; Yixun Lan <dlan@gentoo.org> -docker-1.0.0.ebuild,
+ -docker-1.0.1.ebuild, -docker-1.1.0.ebuild, -docker-1.2.0.ebuild:
+ clean vulnerable versions due to security bug 529670, proxy for maintainer
+
+*docker-1.3.1 (31 Oct 2014)
+
+ 31 Oct 2014; Kacper Kowalik <xarthisius@gentoo.org> +docker-1.3.1.ebuild:
+ 1.3.1 version bump
+
+*docker-1.2.0 (09 Sep 2014)
+
+ 09 Sep 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-1.2.0.ebuild:
+ 1.2.0 version bump
+
+ 06 Aug 2014; Patrick Lauer <patrick@gentoo.org> docker-1.0.0.ebuild,
+ docker-1.0.1.ebuild, docker-1.1.0.ebuild:
+ Make description more repoman-happy
+
+ 04 Jul 2014; Greg Kroah-Hartman <gregkh@gentoo.org> -docker-0.10.0.ebuild,
+ -docker-0.11.1.ebuild, -docker-0.7.1-r1.ebuild, -docker-0.7.1.ebuild,
+ -docker-0.7.2.ebuild, -docker-0.7.3.ebuild, -docker-0.7.4.ebuild,
+ -docker-0.7.5.ebuild, -docker-0.7.6.ebuild, -docker-0.8.0.ebuild,
+ -docker-0.8.1.ebuild, -docker-0.9.0.ebuild, -docker-0.9.1.ebuild:
+ remove obsolete ebuilds
+
+*docker-1.1.0 (04 Jul 2014)
+
+ 04 Jul 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-1.1.0.ebuild:
+ 1.1.0 update
+
+*docker-1.0.1 (29 Jun 2014)
+
+ 29 Jun 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-1.0.1.ebuild:
+ 1.0.1 version bump
+
+ 25 Jun 2014; Patrick Lauer <patrick@gentoo.org> -docker-0.7.0.ebuild:
+ Remove ebuild that fetches from live git
+
+*docker-1.0.0 (09 Jun 2014)
+
+ 09 Jun 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-1.0.0.ebuild:
+ 1.0.0 release
+
+ 03 Jun 2014; Jeroen Roovers <jer@gentoo.org> metadata.xml:
+ Add proxy-maint herd.
+
+*docker-0.11.1 (09 May 2014)
+
+ 09 May 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.11.1.ebuild,
+ metadata.xml:
+ 0.11.1 version bump
+
+*docker-0.10.0 (09 Apr 2014)
+
+ 09 Apr 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.10.0.ebuild:
+ 0.10.0 bump
+
+*docker-0.9.1 (26 Mar 2014)
+
+ 26 Mar 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.9.1.ebuild:
+ 0.9.1 bump
+
+*docker-0.9.0 (11 Mar 2014)
+
+ 11 Mar 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.9.0.ebuild,
+ metadata.xml:
+ 0.9.0 version bump
+
+*docker-0.8.1 (21 Feb 2014)
+
+ 21 Feb 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.8.1.ebuild:
+ 0.8.1 bump
+
+*docker-0.8.0 (05 Feb 2014)
+
+ 05 Feb 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.8.0.ebuild,
+ metadata.xml:
+ 0.8.0 bump
+
+*docker-0.7.6 (16 Jan 2014)
+
+ 16 Jan 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.7.6.ebuild:
+ 0.7.6 version bump
+
+ 10 Jan 2014; Greg Kroah-Hartman <gregkh@gentoo.org> -docker-0.6.3-r1.ebuild,
+ -docker-0.6.3.ebuild, -docker-0.6.5.ebuild, -docker-0.6.6.ebuild,
+ -docker-0.6.7.ebuild:
+ remove 0.6.* versions
+
+*docker-0.7.5 (10 Jan 2014)
+
+ 10 Jan 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.7.5.ebuild:
+ 0.7.5 bump
+
+*docker-0.7.4 (10 Jan 2014)
+
+ 10 Jan 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.7.4.ebuild:
+ 0.7.4 bump
+
+*docker-0.7.3 (04 Jan 2014)
+
+ 04 Jan 2014; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.7.3.ebuild:
+ 0.7.3 version bump
+
+ 31 Dec 2013; Tom Wijsman <TomWij@gentoo.org> -files/docker.initd,
+ metadata.xml:
+ [QA] Remove unused files. Added proxy-maintainers to metadata.xml due to non-
+ gorg e-mail address.
+
+*docker-0.7.2 (17 Dec 2013)
+*docker-0.7.1-r1 (17 Dec 2013)
+
+ 17 Dec 2013; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.7.1-r1.ebuild,
+ +docker-0.7.2.ebuild:
+ 0.7.1-rc1 and 0.7.2 version bump
+
+*docker-0.7.1 (10 Dec 2013)
+
+ 10 Dec 2013; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.7.1.ebuild:
+ 0.7.1 bump
+
+*docker-0.7.0 (26 Nov 2013)
+
+ 26 Nov 2013; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.7.0.ebuild,
+ metadata.xml:
+ add 0.7.0 release
+
+*docker-0.6.7 (23 Nov 2013)
+
+ 23 Nov 2013; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.6.7.ebuild:
+ 0.6.7 version bump
+
+*docker-0.6.6 (11 Nov 2013)
+
+ 11 Nov 2013; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.6.6.ebuild:
+ 0.6.6 version bump
+
+*docker-0.6.5 (31 Oct 2013)
+
+ 31 Oct 2013; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.6.5.ebuild:
+ version bump to 0.6.5
+
+*docker-0.6.3-r1 (05 Oct 2013)
+
+ 05 Oct 2013; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.6.3-r1.ebuild:
+ add dependancy on app-arch/xz-utils as it is needed
+
+*docker-0.6.3 (25 Sep 2013)
+
+ 25 Sep 2013; Greg Kroah-Hartman <gregkh@gentoo.org> +docker-0.6.3.ebuild,
+ +files/docker-r2.confd, +files/docker-r2.initd, +files/docker.initd,
+ +files/docker.service, +metadata.xml:
+ initial docker ebuild taken (with permission) from git@github.com:tianon
+ /docker-overlay.git
diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest
new file mode 100644
index 00000000..2f87f173
--- /dev/null
+++ b/app-emulation/docker/Manifest
@@ -0,0 +1 @@
+DIST docker-1.7.1.tar.gz 6853527 SHA256 9cd26415d68a88d3cf576e7e78c2fe97f42af795404f552728acc5b41dccf4ef SHA512 9b32c3deab77a27a4322a3ccbb3759a2c2a5627605090c4517c3754e6821407abcf5ffa227bad1fdafcbba068cdcaab586015dd8cfe9aed7e8a221d0615463f1 WHIRLPOOL 41b1afd8ea08c3452e5658d73e85c3b79a64f85fb4cb99c4c6a2ce1ab49836cebbe14724afe47898cb8d9bb9d4d69c64ff1c061895f3b9534150bc7ab50e2b22
diff --git a/app-emulation/docker/docker-1.7.1.ebuild b/app-emulation/docker/docker-1.7.1.ebuild
new file mode 100644
index 00000000..cff5ab96
--- /dev/null
+++ b/app-emulation/docker/docker-1.7.1.ebuild
@@ -0,0 +1,268 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Docker complements kernel namespacing with a high-level API which operates at the process level"
+HOMEPAGE="https://www.docker.com"
+
+GITHUB_URI="github.com/docker/docker"
+
+if [[ ${PV} == *9999 ]]; then
+ SRC_URI=""
+ EGIT_REPO_URI="git://${GITHUB_URI}.git"
+ inherit git-2
+else
+ MY_PV="${PV/_/-}"
+ MY_P="${PN}-${MY_PV}"
+ SRC_URI="https://${GITHUB_URI}/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+ S="${WORKDIR}/${MY_P}"
+ DOCKER_GITCOMMIT="786b29d"
+ KEYWORDS="amd64"
+ [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!"
+fi
+
+inherit bash-completion-r1 eutils linux-info multilib systemd udev user
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="apparmor aufs btrfs +contrib +device-mapper doc experimental lxc overlay vim-syntax"
+
+# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#build-dependencies
+CDEPEND="
+ >=dev-db/sqlite-3.7.9:3
+ device-mapper? (
+ >=sys-fs/lvm2-2.02.89[thin]
+ )
+"
+
+DEPEND="
+ ${CDEPEND}
+ >=dev-lang/go-1.4:0 <dev-lang/go-1.5
+ btrfs? (
+ >=sys-fs/btrfs-progs-3.8
+ )
+"
+
+# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#runtime-dependencies
+# https://github.com/docker/docker/blob/master/hack/PACKAGERS.md#optional-dependencies
+RDEPEND="
+ ${CDEPEND}
+
+ !app-emulation/docker-bin
+ >=net-firewall/iptables-1.4
+ sys-process/procps
+ >=dev-vcs/git-1.7
+ >=app-arch/xz-utils-4.9
+
+ lxc? (
+ >=app-emulation/lxc-1.0.7
+ )
+ aufs? (
+ || (
+ >=sys-kernel/linux-argent-3.18
+ >=sys-kernel/linux-kogaion-3.14
+ )
+ )
+
+ apparmor? (
+ sys-libs/libapparmor[static-libs]
+ )
+"
+
+RESTRICT="installsources strip"
+
+# see "contrib/check-config.sh" from upstream's sources
+CONFIG_CHECK="
+ ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS
+ ~DEVPTS_MULTIPLE_INSTANCES
+ ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS
+ ~MACVLAN ~VETH ~BRIDGE ~BRIDGE_NETFILTER
+ ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE
+ ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK
+ ~NF_NAT ~NF_NAT_NEEDED
+
+ ~POSIX_MQUEUE
+
+ ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED
+
+ ~BLK_CGROUP
+ ~IOSCHED_CFQ
+ ~CGROUP_PERF
+ ~CFS_BANDWIDTH
+"
+
+ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers"
+ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering"
+ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering"
+ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering"
+
+pkg_setup() {
+ if kernel_is lt 3 10; then
+ ewarn ""
+ ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported."
+ ewarn " - http://docs.docker.com/installation/binaries/#check-kernel-dependencies"
+ fi
+
+ # for where these kernel versions come from, see:
+ # https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog*
+ if ! {
+ kernel_is ge 3 16 \
+ || { kernel_is 3 15 && kernel_is ge 3 15 5; } \
+ || { kernel_is 3 14 && kernel_is ge 3 14 12; } \
+ || { kernel_is 3 12 && kernel_is ge 3 12 25; }
+ }; then
+ ewarn ""
+ ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+"
+ ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)"
+ ewarn ""
+ ewarn "See also https://github.com/docker/docker/issues/2960"
+ fi
+
+ if kernel_is le 3 18; then
+ CONFIG_CHECK+="
+ ~RESOURCE_COUNTERS
+ "
+ fi
+
+ if use aufs; then
+ CONFIG_CHECK+="
+ ~AUFS_FS
+ ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
+ "
+ # TODO there must be a way to detect "sys-kernel/aufs-sources" so we don't warn "sys-fs/aufs3" users about this
+ # an even better solution would be to check if the current kernel sources include CONFIG_AUFS_FS as an option, but that sounds hairy and error-prone
+ ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used"
+ fi
+
+ if use btrfs; then
+ CONFIG_CHECK+="
+ ~BTRFS_FS
+ "
+ fi
+
+ if use device-mapper; then
+ CONFIG_CHECK+="
+ ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY
+ "
+ fi
+
+ if use overlay; then
+ CONFIG_CHECK+="
+ ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL
+ "
+ fi
+
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ # allow user patches (use sparingly - upstream won't support them)
+ epatch_user
+ epatch "${FILESDIR}"/${P}-service-patch.patch
+}
+
+src_compile() {
+ # if we treat them right, Docker's build scripts will set up a
+ # reasonable GOPATH for us
+ export AUTO_GOPATH=1
+
+ # setup CFLAGS and LDFLAGS for separate build target
+ # see https://github.com/tianon/docker-overlay/pull/10
+ export CGO_CFLAGS="-I${ROOT}/usr/include"
+ export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
+
+ # if we're building from a zip, we need the GITCOMMIT value
+ [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
+
+ if gcc-specs-pie; then
+ sed -i "s/EXTLDFLAGS_STATIC='/EXTLDFLAGS_STATIC='-fno-PIC /" hack/make.sh || die
+ grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed'
+
+ sed -i "s/LDFLAGS_STATIC_DOCKER='/LDFLAGS_STATIC_DOCKER='-extldflags -fno-PIC /" hack/make/dynbinary || die
+ grep -q -- '-fno-PIC' hack/make/dynbinary || die 'hardened sed failed'
+ fi
+
+ # let's set up some optional features :)
+ export DOCKER_BUILDTAGS=''
+ for gd in aufs btrfs device-mapper overlay; do
+ if ! use $gd; then
+ DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}"
+ fi
+ done
+
+ if use apparmor; then
+ DOCKER_BUILDTAGS+=' apparmor'
+ fi
+
+ # https://github.com/docker/docker/pull/13338
+ if use experimental; then
+ export DOCKER_EXPERIMENTAL=1
+ else
+ unset DOCKER_EXPERIMENTAL
+ fi
+
+ # time to build!
+ ./hack/make.sh dynbinary || die 'dynbinary failed'
+
+ # TODO get go-md2man and then include the man pages using man/md2man-all.sh
+}
+
+src_install() {
+ VERSION=$(cat VERSION)
+ newbin bundles/$VERSION/dynbinary/docker-$VERSION docker
+ exeinto /usr/libexec/docker
+ newexe bundles/$VERSION/dynbinary/dockerinit-$VERSION dockerinit
+
+ newinitd contrib/init/openrc/docker.initd docker
+ newconfd contrib/init/openrc/docker.confd docker
+
+ systemd_dounit contrib/init/systemd/docker.{service,socket}
+
+ udev_dorules contrib/udev/*.rules
+
+ dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md
+ if use doc; then
+ # TODO doman man/man*/*
+
+ docompress -x /usr/share/doc/${PF}/md
+ docinto md
+ dodoc -r docs/*
+ fi
+
+ dobashcomp contrib/completion/bash/*
+
+ insinto /usr/share/zsh/site-functions
+ doins contrib/completion/zsh/*
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles
+ doins -r contrib/syntax/vim/ftdetect
+ doins -r contrib/syntax/vim/syntax
+ fi
+
+ if use contrib; then
+ mkdir -p "${D}/usr/share/${PN}/contrib"
+ cp -R contrib/* "${D}/usr/share/${PN}/contrib"
+ fi
+}
+
+pkg_postinst() {
+ udev_reload
+
+ elog ""
+ elog "To use Docker, the Docker daemon must be running as root. To automatically"
+ elog "start the Docker daemon at boot, add Docker to the default runlevel:"
+ elog " rc-update add docker default"
+ elog "Similarly for systemd:"
+ elog " systemctl enable docker.service"
+ elog ""
+
+ # create docker group if the code checking for it in /etc/group exists
+ enewgroup docker
+
+ elog "To use Docker as a non-root user, add yourself to the 'docker' group:"
+ elog " usermod -aG docker youruser"
+ elog ""
+}
diff --git a/app-emulation/docker/files/15404-fix-go14_15.patch b/app-emulation/docker/files/15404-fix-go14_15.patch
new file mode 100644
index 00000000..7cda1f93
--- /dev/null
+++ b/app-emulation/docker/files/15404-fix-go14_15.patch
@@ -0,0 +1,85 @@
+From f83d05c3be3c3bcc84f6fa229504848ee8078321 Mon Sep 17 00:00:00 2001
+From: Vincent Batts <vbatts@redhat.com>
+Date: Fri, 7 Aug 2015 10:18:20 -0400
+Subject: [PATCH] devicemapper: fix zero-sized field access
+
+Fixes: #15279
+
+Due to
+https://github.com/golang/go/commit/7904946eeb35faece61bbf6f5b3cc8be2f519c17
+the devices field is dropped.
+
+This solution works on go1.4 and go1.5
+
+Signed-off-by: Vincent Batts <vbatts@redhat.com>
+---
+ daemon/graphdriver/devmapper/deviceset.go | 14 +++++++++-----
+ pkg/devicemapper/devmapper_wrapper.go | 18 +++++++++++++++---
+ 2 files changed, 24 insertions(+), 8 deletions(-)
+
+diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go
+index 6dddeb1..97e2032 100644
+--- a/daemon/graphdriver/devmapper/deviceset.go
++++ b/daemon/graphdriver/devmapper/deviceset.go
+@@ -1509,12 +1509,16 @@ func (devices *DeviceSet) deactivatePool() error {
+ if err != nil {
+ return err
+ }
+- if d, err := devicemapper.GetDeps(devname); err == nil {
+- // Access to more Debug output
+- logrus.Debugf("[devmapper] devicemapper.GetDeps() %s: %#v", devname, d)
++
++ if devinfo.Exists == 0 {
++ return nil
+ }
+- if devinfo.Exists != 0 {
+- return devicemapper.RemoveDevice(devname)
++ if err := devicemapper.RemoveDevice(devname); err != nil {
++ return err
++ }
++
++ if d, err := devicemapper.GetDeps(devname); err == nil {
++ logrus.Warnf("[devmapper] device %s still has %d active dependents", devname, d.Count)
+ }
+
+ return nil
+diff --git a/pkg/devicemapper/devmapper_wrapper.go b/pkg/devicemapper/devmapper_wrapper.go
+index 87c2003..44ca772 100644
+--- a/pkg/devicemapper/devmapper_wrapper.go
++++ b/pkg/devicemapper/devmapper_wrapper.go
+@@ -38,7 +38,10 @@ static void log_with_errno_init()
+ */
+ import "C"
+
+-import "unsafe"
++import (
++ "reflect"
++ "unsafe"
++)
+
+ type (
+ CDmTask C.struct_dm_task
+@@ -184,12 +187,21 @@ func dmTaskGetDepsFct(task *CDmTask) *Deps {
+ if Cdeps == nil {
+ return nil
+ }
++
++ // golang issue: https://github.com/golang/go/issues/11925
++ hdr := reflect.SliceHeader{
++ Data: uintptr(unsafe.Pointer(uintptr(unsafe.Pointer(Cdeps)) + unsafe.Sizeof(*Cdeps))),
++ Len: int(Cdeps.count),
++ Cap: int(Cdeps.count),
++ }
++ devices := *(*[]C.uint64_t)(unsafe.Pointer(&hdr))
++
+ deps := &Deps{
+ Count: uint32(Cdeps.count),
+ Filler: uint32(Cdeps.filler),
+ }
+- for _, device := range Cdeps.device {
+- deps.Device = append(deps.Device, (uint64)(device))
++ for _, device := range devices {
++ deps.Device = append(deps.Device, uint64(device))
+ }
+ return deps
+ }
diff --git a/app-emulation/docker/files/18074-disable-journald-arm.patch b/app-emulation/docker/files/18074-disable-journald-arm.patch
new file mode 100644
index 00000000..e7c9a2f6
--- /dev/null
+++ b/app-emulation/docker/files/18074-disable-journald-arm.patch
@@ -0,0 +1,30 @@
+diff --git a/daemon/logger/journald/journald.go b/daemon/logger/journald/journald.go
+index c729b56..97c379c 100644
+--- a/daemon/logger/journald/journald.go
++++ b/daemon/logger/journald/journald.go
+@@ -1,4 +1,4 @@
+-// +build linux
++// +build linux,!arm
+
+ // Package journald provides the log driver for forwarding server logs
+ // to endpoints that receive the systemd format.
+diff --git a/daemon/logger/journald/journald_unsupported.go b/daemon/logger/journald/journald_unsupported.go
+index d52ca92..8e9034a 100644
+--- a/daemon/logger/journald/journald_unsupported.go
++++ b/daemon/logger/journald/journald_unsupported.go
+@@ -1,4 +1,4 @@
+-// +build !linux
++// +build !linux linux,arm
+
+ package journald
+
+diff --git a/daemon/logger/journald/read.go b/daemon/logger/journald/read.go
+index 80c1fbd..0477c04 100644
+--- a/daemon/logger/journald/read.go
++++ b/daemon/logger/journald/read.go
+@@ -1,4 +1,4 @@
+-// +build linux,cgo,!static_build,journald
++// +build linux,cgo,!static_build,journald,!arm
+
+ package journald
+
diff --git a/app-emulation/docker/files/7179-add-audit_write-cap.patch b/app-emulation/docker/files/7179-add-audit_write-cap.patch
new file mode 100644
index 00000000..6263698c
--- /dev/null
+++ b/app-emulation/docker/files/7179-add-audit_write-cap.patch
@@ -0,0 +1,29 @@
+From 29ecc95c31ecfe15e3b3d8db94cea1c555e526a3 Mon Sep 17 00:00:00 2001
+From: Alexandr Morozov <lk4d4math@gmail.com>
+Date: Wed, 23 Jul 2014 09:57:41 +0400
+Subject: [PATCH] Add AUDIT_WRITE cap
+
+Fixes #6345
+
+Thanks @larsks for outstanding investigation
+
+Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
+---
+ daemon/execdriver/native/template/default_template.go | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/daemon/execdriver/native/template/default_template.go b/daemon/execdriver/native/template/default_template.go
+index cc5cc4f..be3dd5a 100644
+--- a/daemon/execdriver/native/template/default_template.go
++++ b/daemon/execdriver/native/template/default_template.go
+@@ -23,6 +23,7 @@ func New() *libcontainer.Config {
+ "NET_BIND_SERVICE",
+ "SYS_CHROOT",
+ "KILL",
++ "AUDIT_WRITE",
+ },
+ Namespaces: map[string]bool{
+ "NEWNS": true,
+--
+2.0.3
+
diff --git a/app-emulation/docker/files/docker-1.7.1-service-patch.patch b/app-emulation/docker/files/docker-1.7.1-service-patch.patch
new file mode 100644
index 00000000..10f1002c
--- /dev/null
+++ b/app-emulation/docker/files/docker-1.7.1-service-patch.patch
@@ -0,0 +1,12 @@
+--- docker-1.7.1/contrib/init/systemd/docker.service.orig 2015-07-14 21:41:25.000000000 +0300
++++ docker-1.7.1/contrib/init/systemd/docker.service 2016-03-31 23:38:11.461808109 +0300
+@@ -5,7 +5,8 @@
+ Requires=docker.socket
+
+ [Service]
+-ExecStart=/usr/bin/docker -d -H fd://
++EnvironmentFile=/etc/default/docker
++ExecStart=/usr/bin/docker -d $DOCKER_OPTS -H fd://
+ MountFlags=slave
+ LimitNOFILE=1048576
+ LimitNPROC=1048576
diff --git a/app-emulation/docker/files/docker-r2.confd b/app-emulation/docker/files/docker-r2.confd
new file mode 100644
index 00000000..5436b233
--- /dev/null
+++ b/app-emulation/docker/files/docker-r2.confd
@@ -0,0 +1,18 @@
+# /etc/conf.d/docker: config file for /etc/init.d/docker
+
+# where the docker daemon output gets piped
+#DOCKER_LOGFILE="/var/log/docker.log"
+
+# where docker's pid get stored
+#DOCKER_PIDFILE="/run/docker.pid"
+
+# where the docker daemon itself is run from
+#DOCKER_BINARY="/usr/bin/docker"
+
+# uncomment this for a simple workaround to
+# https://github.com/dotcloud/docker/issues/1422
+#DOCKER_WORKAROUND_1422="1"
+
+# if you find that the default DOCKER_WORKAROUND_1422 delay of one second
+# is not sufficient, try uncommenting and increasing this value
+#DOCKER_WORKAROUND_1422_DELAY="1"
diff --git a/app-emulation/docker/files/docker-r2.initd b/app-emulation/docker/files/docker-r2.initd
new file mode 100644
index 00000000..b081d9c7
--- /dev/null
+++ b/app-emulation/docker/files/docker-r2.initd
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log}
+DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid}
+DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker}
+DOCKER_WORKAROUND_1422=${DOCKER_WORKAROUND_1422:-0}
+DOCKER_WORKAROUND_1422_DELAY=${DOCKER_WORKAROUND_1422_DELAY:-1}
+
+start() {
+ checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
+
+ ebegin "Starting docker daemon"
+ start-stop-daemon --start --background \
+ --exec "$DOCKER_BINARY" \
+ --pidfile "$DOCKER_PIDFILE" \
+ --stdout "$DOCKER_LOGFILE" \
+ --stderr "$DOCKER_LOGFILE" \
+ -- -d -p "$DOCKER_PIDFILE"
+ eend $?
+ ret=$?
+
+ if [ $ret -eq 0 ] \
+ && [ "$DOCKER_WORKAROUND_1422" ] \
+ && [ "$DOCKER_WORKAROUND_1422" -gt 0 ] \
+ ; then
+ # see https://github.com/dotcloud/docker/issues/1422
+ ewarn "Working around gh#1422 (via busybox image); this may take a moment"
+
+ # we were calling "docker run" more quickly than "docker -d" could get
+ # fired up, so our workaround wasn't successful without a short delay
+ sleep $DOCKER_WORKAROUND_1422_DELAY
+
+ # TODO when we get https://github.com/dotcloud/docker/pull/1589, these
+ # both need -rm so we clean up after ourselves (thanks, @eliasp!)
+ docker run -i -t busybox true &> /dev/null || true
+ # first run will fail, so we ignore its output and result and run again
+ docker run -i -t busybox true
+
+ ewend $?
+ fi
+
+ return $ret
+}
+
+stop() {
+ ebegin "Stopping docker daemon"
+ start-stop-daemon --stop \
+ --exec "$DOCKER_BINARY" \
+ --pidfile "$DOCKER_PIDFILE"
+ eend $?
+}
diff --git a/app-emulation/docker/files/docker-r3.confd b/app-emulation/docker/files/docker-r3.confd
new file mode 100644
index 00000000..ae247c00
--- /dev/null
+++ b/app-emulation/docker/files/docker-r3.confd
@@ -0,0 +1,13 @@
+# /etc/conf.d/docker: config file for /etc/init.d/docker
+
+# where the docker daemon output gets piped
+#DOCKER_LOGFILE="/var/log/docker.log"
+
+# where docker's pid get stored
+#DOCKER_PIDFILE="/run/docker.pid"
+
+# where the docker daemon itself is run from
+#DOCKER_BINARY="/usr/bin/docker"
+
+# any other random options you want to pass to docker
+DOCKER_OPTS=""
diff --git a/app-emulation/docker/files/docker-r3.initd b/app-emulation/docker/files/docker-r3.initd
new file mode 100644
index 00000000..a3031850
--- /dev/null
+++ b/app-emulation/docker/files/docker-r3.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log}
+DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid}
+DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker}
+DOCKER_OPTS=${DOCKER_OPTS:-}
+
+start() {
+ checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
+
+ ebegin "Starting docker daemon"
+ start-stop-daemon --start --background \
+ --exec "$DOCKER_BINARY" \
+ --pidfile "$DOCKER_PIDFILE" \
+ --stdout "$DOCKER_LOGFILE" \
+ --stderr "$DOCKER_LOGFILE" \
+ -- -d -p "$DOCKER_PIDFILE" \
+ $DOCKER_OPTS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping docker daemon"
+ start-stop-daemon --stop \
+ --exec "$DOCKER_BINARY" \
+ --pidfile "$DOCKER_PIDFILE"
+ eend $?
+}
diff --git a/app-emulation/docker/files/docker.initd b/app-emulation/docker/files/docker.initd
new file mode 100644
index 00000000..18ca8ab9
--- /dev/null
+++ b/app-emulation/docker/files/docker.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log}
+DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid}
+DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker}
+
+start() {
+ touch "$DOCKER_LOGFILE"
+ chown root:docker "$DOCKER_LOGFILE"
+ chmod 0644 "$DOCKER_LOGFILE"
+
+ ebegin "Starting docker daemon"
+ start-stop-daemon --start --background \
+ --exec "$DOCKER_BINARY" \
+ --pidfile "$DOCKER_PIDFILE" \
+ --stdout "$DOCKER_LOGFILE" \
+ --stderr "$DOCKER_LOGFILE" \
+ -- -d -p "$DOCKER_PIDFILE"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping docker daemon"
+ start-stop-daemon --stop \
+ --exec "$DOCKER_BINARY" \
+ --pidfile "$DOCKER_PIDFILE"
+ eend $?
+}
diff --git a/app-emulation/docker/files/docker.service b/app-emulation/docker/files/docker.service
new file mode 100644
index 00000000..bd53c520
--- /dev/null
+++ b/app-emulation/docker/files/docker.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Easily create lightweight, portable, self-sufficient containers from any application!
+Requires=network.target
+After=multi-user.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/default/docker
+ExecStartPre=/bin/mount --make-rprivate /
+ExecStart=/usr/bin/docker -d ${DOCKER_OPTS}
+
+[Install]
+WantedBy=multi-user.target