aboutsummaryrefslogtreecommitdiff
path: root/package/docker-containerd
diff options
context:
space:
mode:
authorGravatar Christian Stewart <christian@paral.in>2016-07-04 15:30:32 -0700
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-05 11:01:00 +0200
commit16ec6a6c783e20660d366e06ab2a12275acd72f9 (patch)
treecd88f1e5d78f18f4d6798cf7ffc63022f4861ab5 /package/docker-containerd
parentf812c6b36f59583d37aab25aef8a292494532c6e (diff)
downloadbuildroot-16ec6a6c783e20660d366e06ab2a12275acd72f9.tar.gz
buildroot-16ec6a6c783e20660d366e06ab2a12275acd72f9.tar.bz2
docker-containerd: new package
docker-containerd is a daemon and API for controlling and managing runC containers. https://containerd.tools/ Signed-off-by: Christian Stewart <christian@paral.in> Reviewed-by: Romain Naour <romain.naour@gmail.com> [Thomas: - simplify a bit the comments about the runtime dependencies - add missing comment on wchar, and take into account the BR2_USE_MMU dependency in the comment - factorize the build step with a foreach loop.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/docker-containerd')
-rw-r--r--package/docker-containerd/Config.in21
-rw-r--r--package/docker-containerd/docker-containerd.hash2
-rw-r--r--package/docker-containerd/docker-containerd.mk44
3 files changed, 67 insertions, 0 deletions
diff --git a/package/docker-containerd/Config.in b/package/docker-containerd/Config.in
new file mode 100644
index 0000000000..85843b8706
--- /dev/null
+++ b/package/docker-containerd/Config.in
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_DOCKER_CONTAINERD
+ bool "docker-containerd"
+ 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_RUNC # runtime dependency
+ select BR2_PACKAGE_UTIL_LINUX # runtime dependency
+ 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
+ containerd is a daemon to control runC.
+
+ https://github.com/docker/containerd
+
+comment "docker-containerd needs a toolchain w/ threads, wchar"
+ depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+ depends on BR2_USE_MMU
+ depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
diff --git a/package/docker-containerd/docker-containerd.hash b/package/docker-containerd/docker-containerd.hash
new file mode 100644
index 0000000000..a4a427d544
--- /dev/null
+++ b/package/docker-containerd/docker-containerd.hash
@@ -0,0 +1,2 @@
+# Computed locally
+sha256 bdfa54c94f3de901a7983dc0bc924dd2268e9a5f5fe920d27bfdafad60958522 docker-containerd-1b3a81545ca79456086dc2aa424357be98b962ee.tar.gz
diff --git a/package/docker-containerd/docker-containerd.mk b/package/docker-containerd/docker-containerd.mk
new file mode 100644
index 0000000000..7628fe1f59
--- /dev/null
+++ b/package/docker-containerd/docker-containerd.mk
@@ -0,0 +1,44 @@
+################################################################################
+#
+# docker-containerd
+#
+################################################################################
+
+DOCKER_CONTAINERD_VERSION = 1b3a81545ca79456086dc2aa424357be98b962ee
+DOCKER_CONTAINERD_SITE = $(call github,docker,containerd,$(DOCKER_CONTAINERD_VERSION))
+DOCKER_CONTAINERD_LICENSE = Apache-2.0
+DOCKER_CONTAINERD_LICENSE_FILES = LICENSE.code
+
+DOCKER_CONTAINERD_DEPENDENCIES = host-go
+
+DOCKER_CONTAINERD_GOPATH = "$(@D)/vendor"
+DOCKER_CONTAINERD_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
+ CGO_ENABLED=1 \
+ GOBIN="$(@D)/bin" \
+ GOPATH="$(DOCKER_CONTAINERD_GOPATH)"
+
+DOCKER_CONTAINERD_GLDFLAGS = \
+ -X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION) \
+ -extldflags '-static'
+
+define DOCKER_CONTAINERD_CONFIGURE_CMDS
+ mkdir -p $(DOCKER_CONTAINERD_GOPATH)/src/github.com/docker
+ ln -s $(@D) $(DOCKER_CONTAINERD_GOPATH)/src/github.com/docker/containerd
+ mkdir -p $(DOCKER_CONTAINERD_GOPATH)/src/github.com/opencontainers
+ ln -s $(RUNC_SRCDIR) $(DOCKER_CONTAINERD_GOPATH)/src/github.com/opencontainers/runc
+endef
+
+define DOCKER_CONTAINERD_BUILD_CMDS
+ $(foreach d,ctr containerd containerd-shim,\
+ cd $(@D); $(DOCKER_CONTAINERD_MAKE_ENV) $(HOST_DIR)/usr/bin/go build \
+ -v -o $(@D)/bin/$(d) -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./$(d)$(sep))
+endef
+
+define DOCKER_CONTAINERD_INSTALL_TARGET_CMDS
+ ln -fs runc $(TARGET_DIR)/usr/bin/docker-runc
+ $(INSTALL) -D -m 0755 $(@D)/bin/containerd $(TARGET_DIR)/usr/bin/docker-containerd
+ $(INSTALL) -D -m 0755 $(@D)/bin/containerd-shim $(TARGET_DIR)/usr/bin/containerd-shim
+ ln -fs containerd-shim $(TARGET_DIR)/usr/bin/docker-containerd-shim
+endef
+
+$(eval $(generic-package))