Skip to contentSkip to conversation

Add docker engine support

PATCH Superseded Christian Stewart 1 participant 5 messages May 28, 2016

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v5 cover Add docker engine support

This series adds runc, docker-containerd, and docker-engine support.

The aufs graph driver is compiled for the docker-engine, but aufs and other optional graph drivers will work at runtime only if the corresponding kernel features and userspace tools are installed. This is left up to the user.

Patch 1 adds runC, the new minimal CLI for running linux containers. Patch 2 adds docker-containerd, the daemon and API for runC. Patch 3 adds docker-engine, the cli and api for the Docker application engine.

Christian Stewart (3):
runc: new package
docker-containerd: new package
docker-engine: new package

 package/Config.in                                |   3 +
 package/docker-containerd/0001-arm64-fixes.patch | 189 +++++++++++++++++++++++
 package/docker-containerd/Config.in              |  13 ++
 package/docker-containerd/docker-containerd.hash |   2 +
 package/docker-containerd/docker-containerd.mk   |  44 ++++++
 package/docker-engine/Config.in                  |  36 +++++
 package/docker-engine/docker-engine.hash         |   2 +
 package/docker-engine/docker-engine.mk           |  81 ++++++++++
 package/runc/Config.in                           |  13 ++
 package/runc/runc.hash                           |   2 +
 package/runc/runc.mk                             |  46 ++++++
 11 files changed, 431 insertions(+)
 create mode 100644 package/docker-containerd/0001-arm64-fixes.patch
 create mode 100644 package/docker-containerd/Config.in
 create mode 100644 package/docker-containerd/docker-containerd.hash
 create mode 100644 package/docker-containerd/docker-containerd.mk
 create mode 100644 package/docker-engine/Config.in
 create mode 100644 package/docker-engine/docker-engine.hash
 create mode 100644 package/docker-engine/docker-engine.mk
 create mode 100644 package/runc/Config.in
 create mode 100644 package/runc/runc.hash
 create mode 100644 package/runc/runc.mk
Signature · 1 line
2.7.3
#1 lore raw

PATCH v5 1/3 runc: new package

runC is a CLI tool for spawning and running containers according to the OCP specification.

runC is used by the latest Docker engine versions, however, runc itself is standalone and has no other dependencies.

https://runc.io/

---

Changes since v1:
- use call github to generate source url
Changes since v3:
- fix indentation in Config.in
- add dep on threads in Config.in
- break gopath into separate variable
- use HOST_GO_TARGET_ENV
Changes since v4:
- use RUNC_VERSION instead of commit hash
- only show comment when build is possible with threads enabled

---
 package/Config.in      |  1 +
 package/runc/Config.in | 13 +++++++++++++
 package/runc/runc.hash |  2 ++
 package/runc/runc.mk   | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 62 insertions(+)
 create mode 100644 package/runc/Config.in
 create mode 100644 package/runc/runc.hash
 create mode 100644 package/runc/runc.mk
package/Config.in +1 -0
index 9d668bf..6c513ba 100644
@@ -1664,6 +1664,7 @@ endif
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/rsyslog/Config.in"
 endif
+	source "package/runc/Config.in"
 	source "package/scrub/Config.in"
 	source "package/scrypt/Config.in"
 	source "package/smack/Config.in"
package/runc/Config.in new file +13 -0
new file mode 100644
index 0000000..1802e59
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_RUNC
+	bool "runc"
+	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  runC is a CLI tool for spawning and running containers
+	  according to the OCP specification.
+
+	  https://github.com/opencontainers/runc
+
+comment "runc needs a toolchain w/ threads"
+	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/runc/runc.hash new file +2 -0
new file mode 100644
index 0000000..c109c33
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 f9955daed1e73e842b2f28a258fba51f4e72a6b4b64cc3fc06415481d55ce000  runc-v0.1.1.tar.gz
package/runc/runc.mk new file +46 -0

46 lines not on this page · raw message

Signature · 1 line
2.7.3
#2 lore raw

PATCH v5 2/3 docker-containerd: new package

In reply to Christian Stewart

docker-containerd is a daemon and API for controlling and managing runC containers.

https://containerd.tools/

---

Changes since v3:
- Don't depend on runc at compile-time
- Add threading dependency
- Use HOST_GO_TARGET_ENV, partially
- Cleanup compile commands
- Include patch to fix arm64 compilation
Changes since v4:
- Bump to v0.2.2
- update hash for 0.2.2
- fix docker-runc simlink
- use CONTAINERD_VERSION for GitCommit const
- add go arch supports to config.in comment
- did runtime tests
- added signed-off-by to the patch series

---
 package/Config.in                                |   1 +
 package/docker-containerd/0001-arm64-fixes.patch | 189 +++++++++++++++++++++++
 package/docker-containerd/Config.in              |  13 ++
 package/docker-containerd/docker-containerd.hash |   2 +
 package/docker-containerd/docker-containerd.mk   |  44 ++++++
 5 files changed, 249 insertions(+)
 create mode 100644 package/docker-containerd/0001-arm64-fixes.patch
 create mode 100644 package/docker-containerd/Config.in
 create mode 100644 package/docker-containerd/docker-containerd.hash
 create mode 100644 package/docker-containerd/docker-containerd.mk
package/Config.in +1 -0
index 6c513ba..c8365f8 100644
@@ -1631,6 +1631,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/dcron/Config.in"
 	source "package/debianutils/Config.in"
 endif
+	source "package/docker-containerd/Config.in"
 	source "package/cgroupfs-mount/Config.in"
 	source "package/dsp-tools/Config.in"
 	source "package/emlog/Config.in"
package/docker-containerd/0001-arm64-fixes.patch new file +189 -0

189 lines not on this page · raw message

package/docker-containerd/Config.in new file +13 -0
new file mode 100644
index 0000000..e76a6a2
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_DOCKER_CONTAINERD
+	bool "docker-containerd"
+	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_RUNC
+	help
+	  containerd is a daemon to control runC.
+
+	  https://github.com/docker/containerd
+
+comment "docker-containerd needs a toolchain w/ threads"
+	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/docker-containerd/docker-containerd.hash new file +2 -0
new file mode 100644
index 0000000..b98e651
@@ -0,0 +1,2 @@
+# Computed locally
+sha256 a21efc7ea4bb97306ae9807caadca6782358679f38d3afd606cb599b6853bc52  docker-containerd-v0.2.2.tar.gz
package/docker-containerd/docker-containerd.mk new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
2.7.3
#3 lore raw

PATCH v5 3/3 docker-engine: new package

In reply to Christian Stewart

Docker is a platform to build, ship, and run applications in portable containers.

---

Changes since v1:
- use call github to build source URL
Changes since v3:
- fix help indentation in Config.in
- use HOST_GO_TARGET_ENV as a base for build env vars
- cleanup build commands
- cleanup GOPATH and vendor directory setup
- Remove selections for graph drivers. Docker will gracefully degrade at runtime to the best available graphdriver. It is unnecessary to disable these at build time, or to pull in any other dependencies like aufs-util or btrfs tools. The daemon will use whatever is available at runtime.
Changes since v4:
- remove commit hash from version scheme

---
 package/Config.in                        |  1 +
 package/docker-engine/Config.in          | 36 ++++++++++++++
 package/docker-engine/docker-engine.hash |  2 +
 package/docker-engine/docker-engine.mk   | 81 ++++++++++++++++++++++++++++++++
 4 files changed, 120 insertions(+)
 create mode 100644 package/docker-engine/Config.in
 create mode 100644 package/docker-engine/docker-engine.hash
 create mode 100644 package/docker-engine/docker-engine.mk
package/Config.in +1 -0
index c8365f8..b829075 100644
@@ -1632,6 +1632,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/debianutils/Config.in"
 endif
 	source "package/docker-containerd/Config.in"
+	source "package/docker-engine/Config.in"
 	source "package/cgroupfs-mount/Config.in"
 	source "package/dsp-tools/Config.in"
 	source "package/emlog/Config.in"
package/docker-engine/Config.in new file +36 -0
new file mode 100644
index 0000000..20507f0
@@ -0,0 +1,36 @@
+config BR2_PACKAGE_DOCKER_ENGINE
+	bool "docker-engine"
+	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU # util-linux
+	depends on BR2_USE_WCHAR # util-linux
+	select BR2_PACKAGE_DOCKER_CONTAINERD
+	select BR2_PACKAGE_RUNC
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_BINARIES
+	select BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT
+	select BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT
+	select BR2_PACKAGE_UTIL_LINUX_MOUNT
+	help
+	  Docker is a platform to build, ship,
+	  and run applications as lightweight containers.
+
+	  https://github.com/docker/docker
+
+if BR2_PACKAGE_DOCKER_ENGINE
+
+config BR2_PACKAGE_DOCKER_ENGINE_DAEMON
+	bool "docker daemon"
+	default y
+	help
+	  Build the Docker system daemon.
+	  If not selected, will build client only.
+
+config BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL
+	bool "build experimental features"
+
+endif
+
+comment "docker-engine needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/docker-engine/docker-engine.hash new file +2 -0
new file mode 100644
index 0000000..7b93669
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 04de3750738b6f888f03520fb67db22e95e8a8e016ae901428e6c5791c9841cc  docker-engine-v1.11.1.tar.gz
package/docker-engine/docker-engine.mk new file +81 -0

81 lines not on this page · raw message

Signature · 1 line
2.7.3
#4 lore raw

PATCH v5 3/3 docker-engine: new package

Thomas,

package/docker-engine/Config.in line 36

Quoted 4 lines · Christian Stewart
package/docker-engine/Config.in new file +2 -0
+comment "docker-engine needs a toolchain w/ threads"
+       depends on !BR2_TOOLCHAIN_HAS_THREADS

Despite reviewing this several times before submitting, it's just occurred to me I forgot to put the HOST_GO_ARCH_SUPPORTS line on this package. I did include it in the previous few.

Here's how this *should* look:

+comment "docker-engine needs a toolchain w/ threads"
+ depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+ depends on !BR2_TOOLCHAIN_HAS_THREADS

Apologies, hopefully this is something you can touch up without needing a respin.

Best,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160528/72c05aca/attachment.html>