* [Buildroot] [PATCH v3 0/3] Add docker engine support @ 2016-05-25 23:31 Christian Stewart 2016-05-25 23:31 ` [Buildroot] [PATCH v3 1/3] runc: new package Christian Stewart ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Christian Stewart @ 2016-05-25 23:31 UTC (permalink / raw) To: buildroot This series adds runc, docker-containerd, and docker-engine support. Aufs is disabled in this version of the series until the pending aufs series is merged. This version of the series can be merged without aufs support, and aufs can simply be enabled with another patch later after the aufs series is merged. 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. Changes for v2: - Fixed many minor mistakes in the original runC files - Added hashes - Added docker-containerd and docker-engine Changes for v3: - Use correct github download URLs - Add note about arm64 fixes in docker-containerd Christian Stewart (3): runc: new package docker-containerd: new package docker-engine: new package package/Config.in | 3 + package/docker-containerd/Config.in | 8 ++ package/docker-containerd/docker-containerd.hash | 2 + package/docker-containerd/docker-containerd.mk | 48 ++++++++++ package/docker-engine/Config.in | 70 +++++++++++++++ package/docker-engine/docker-engine.hash | 2 + package/docker-engine/docker-engine.mk | 110 +++++++++++++++++++++++ package/runc/Config.in | 8 ++ package/runc/runc.hash | 2 + package/runc/runc.mk | 49 ++++++++++ 10 files changed, 302 insertions(+) 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 -- 2.7.3 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/3] runc: new package 2016-05-25 23:31 [Buildroot] [PATCH v3 0/3] Add docker engine support Christian Stewart @ 2016-05-25 23:31 ` Christian Stewart 2016-05-26 19:12 ` Thomas Petazzoni 2016-05-25 23:31 ` [Buildroot] [PATCH v3 2/3] docker-containerd: " Christian Stewart 2016-05-25 23:31 ` [Buildroot] [PATCH v3 3/3] docker-engine: " Christian Stewart 2 siblings, 1 reply; 12+ messages in thread From: Christian Stewart @ 2016-05-25 23:31 UTC (permalink / raw) To: buildroot 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/ Signed-off-by: Christian Stewart <christian@paral.in> --- Changes since v1: - use call github to generate source url --- Signed-off-by: Christian Stewart <christian@paral.in> --- package/Config.in | 1 + package/runc/Config.in | 8 ++++++++ package/runc/runc.hash | 2 ++ package/runc/runc.mk | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 package/runc/Config.in create mode 100644 package/runc/runc.hash create mode 100644 package/runc/runc.mk diff --git a/package/Config.in b/package/Config.in index 9d668bf..6c513ba 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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" diff --git a/package/runc/Config.in b/package/runc/Config.in new file mode 100644 index 0000000..99d55d0 --- /dev/null +++ b/package/runc/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_RUNC + bool "runc" + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS + help + runC is a CLI tool for spawning and running containers + according to the OCP specification. + + https://github.com/opencontainers/runc diff --git a/package/runc/runc.hash b/package/runc/runc.hash new file mode 100644 index 0000000..c109c33 --- /dev/null +++ b/package/runc/runc.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 f9955daed1e73e842b2f28a258fba51f4e72a6b4b64cc3fc06415481d55ce000 runc-v0.1.1.tar.gz diff --git a/package/runc/runc.mk b/package/runc/runc.mk new file mode 100644 index 0000000..5032fa4 --- /dev/null +++ b/package/runc/runc.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# runc +# +################################################################################ + +RUNC_VERSION = v0.1.1 +RUNC_VERSION_COMMIT = baf6536d6259209c3edfa2b22237af82942d3dfa +RUNC_SITE = $(call github,opencontainers,runc,$(RUNC_VERSION)) + +RUNC_LICENSE = Apache-2.0 +RUNC_LICENSE_FILES = LICENSE + +RUNC_DEPENDENCIES = host-go + +RUNC_MAKE_ENV = \ + GOBIN="$(@D)/bin" \ + GOPATH="$(@D)/Godeps/_workspace" \ + GOARCH=$(GO_GOARCH) \ + CGO_ENABLED=1 + +RUNC_GLDFLAGS = \ + -X main.gitCommit=$(RUNC_VERSION_COMMIT) \ + -extldflags '-static' + +RUNC_GOTAGS = cgo static_build + +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) +RUNC_GOTAGS += seccomp +RUNC_DEPENDENCIES += libseccomp +endif + +define RUNC_CONFIGURE_CMDS + # Put sources at prescribed GOPATH location. + export $(RUNC_MAKE_ENV) && \ + mkdir -p $$GOPATH/src/github.com/opencontainers && \ + ln -s $(@D) $$GOPATH/src/github.com/opencontainers/runc +endef + +define RUNC_BUILD_CMDS + cd $(@D) && $(RUNC_MAKE_ENV) $(HOST_DIR)/usr/bin/go \ + build -v -o $(@D)/bin/runc -tags "$(RUNC_GOTAGS)" -ldflags "$(RUNC_GLDFLAGS)" . +endef + +define RUNC_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/runc $(TARGET_DIR)/usr/bin/runc +endef + +$(eval $(generic-package)) -- 2.7.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/3] runc: new package 2016-05-25 23:31 ` [Buildroot] [PATCH v3 1/3] runc: new package Christian Stewart @ 2016-05-26 19:12 ` Thomas Petazzoni 2016-05-26 19:51 ` Geoff Levand 2016-05-26 20:21 ` Christian Stewart 0 siblings, 2 replies; 12+ messages in thread From: Thomas Petazzoni @ 2016-05-26 19:12 UTC (permalink / raw) To: buildroot Hello, On Wed, 25 May 2016 16:31:20 -0700, Christian Stewart wrote: > diff --git a/package/runc/Config.in b/package/runc/Config.in > new file mode 100644 > index 0000000..99d55d0 > --- /dev/null > +++ b/package/runc/Config.in > @@ -0,0 +1,8 @@ > +config BR2_PACKAGE_RUNC > + bool "runc" > + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS It seems like it uses cgo, so you need a dependency on BR2_TOOLCHAIN_HAS_THREADS here + the corresponding Config.in comment. > + help > + runC is a CLI tool for spawning and running containers > + according to the OCP specification. Indentation for the help text is one tab + two spaces. > + > + https://github.com/opencontainers/runc > diff --git a/package/runc/runc.mk b/package/runc/runc.mk > new file mode 100644 > index 0000000..5032fa4 > --- /dev/null > +++ b/package/runc/runc.mk > @@ -0,0 +1,49 @@ > +################################################################################ > +# > +# runc > +# > +################################################################################ > + > +RUNC_VERSION = v0.1.1 > +RUNC_VERSION_COMMIT = baf6536d6259209c3edfa2b22237af82942d3dfa Why is this thing needed? I see you use it below, but it seems weird. > +RUNC_SITE = $(call github,opencontainers,runc,$(RUNC_VERSION)) > + > +RUNC_LICENSE = Apache-2.0 > +RUNC_LICENSE_FILES = LICENSE > + > +RUNC_DEPENDENCIES = host-go > + > +RUNC_MAKE_ENV = \ > + GOBIN="$(@D)/bin" \ > + GOPATH="$(@D)/Godeps/_workspace" \ > + GOARCH=$(GO_GOARCH) \ > + CGO_ENABLED=1 I guess you should use HOST_GO_TARGET_ENV, as in http://patchwork.ozlabs.org/patch/626824/. > +RUNC_GLDFLAGS = \ > + -X main.gitCommit=$(RUNC_VERSION_COMMIT) \ > + -extldflags '-static' > + > +RUNC_GOTAGS = cgo static_build > + > +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) > +RUNC_GOTAGS += seccomp > +RUNC_DEPENDENCIES += libseccomp > +endif > + > +define RUNC_CONFIGURE_CMDS > + # Put sources at prescribed GOPATH location. > + export $(RUNC_MAKE_ENV) && \ What is the export doing here? > + mkdir -p $$GOPATH/src/github.com/opencontainers && \ > + ln -s $(@D) $$GOPATH/src/github.com/opencontainers/runc There is no need for a && between those lines. And why is this needed at all? What is this "prescribed GOPATH" thing ? > +endef > + > +define RUNC_BUILD_CMDS > + cd $(@D) && $(RUNC_MAKE_ENV) $(HOST_DIR)/usr/bin/go \ > + build -v -o $(@D)/bin/runc -tags "$(RUNC_GOTAGS)" -ldflags "$(RUNC_GLDFLAGS)" . > +endef > + > +define RUNC_INSTALL_TARGET_CMDS > + $(INSTALL) -D -m 0755 $(@D)/bin/runc $(TARGET_DIR)/usr/bin/runc > +endef Other than that, looks good to me. Thanks, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/3] runc: new package 2016-05-26 19:12 ` Thomas Petazzoni @ 2016-05-26 19:51 ` Geoff Levand 2016-05-26 20:01 ` Thomas Petazzoni 2016-05-26 20:21 ` Christian Stewart 1 sibling, 1 reply; 12+ messages in thread From: Geoff Levand @ 2016-05-26 19:51 UTC (permalink / raw) To: buildroot Hi, On Thu, 2016-05-26 at 21:12 +0200, Thomas Petazzoni wrote: > On Wed, 25 May 2016 16:31:20 -0700, Christian Stewart wrote: > +define RUNC_CONFIGURE_CMDS > > +> > > > # Put sources at prescribed GOPATH location. > > +> > > > export $(RUNC_MAKE_ENV) && \ > > What is the export doing here? > > > +> > > > > > mkdir -p $$GOPATH/src/github.com/opencontainers && \ > > +> > > > > > ln -s $(@D) $$GOPATH/src/github.com/opencontainers/runc > > There is no need for a && between those lines. > > And why is this needed at all? What is this "prescribed GOPATH" thing ? Go expects the developer to have a 'workspace' with a prescribed directory layout. Many projects archive their sources with a truncated path, so when they are extracted to a directory (@D in buildroot's case) things need to be fix enough for the go compiler to work. This is a common situation, and these fixups are often seen in project build scripts. See https://golang.org/doc/code.html#Workspaces -Geoff ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/3] runc: new package 2016-05-26 19:51 ` Geoff Levand @ 2016-05-26 20:01 ` Thomas Petazzoni 0 siblings, 0 replies; 12+ messages in thread From: Thomas Petazzoni @ 2016-05-26 20:01 UTC (permalink / raw) To: buildroot Hello, On Thu, 26 May 2016 12:51:49 -0700, Geoff Levand wrote: > Go expects the developer to have a 'workspace' with a > prescribed directory layout. Many projects archive their > sources with a truncated path, so when they are extracted > to a directory (@D in buildroot's case) things need to be > fix enough for the go compiler to work. This is a common > situation, and these fixups are often seen in project > build scripts. > > See https://golang.org/doc/code.html#Workspaces I have no problem with Go requiring a "workspace" to have a certain organization. But why does these workspaces all need to be in $$GOPATH ? Why can't $(@D) for each package contain a workspace ? Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/3] runc: new package 2016-05-26 19:12 ` Thomas Petazzoni 2016-05-26 19:51 ` Geoff Levand @ 2016-05-26 20:21 ` Christian Stewart 2016-05-27 5:23 ` Thomas Petazzoni 1 sibling, 1 reply; 12+ messages in thread From: Christian Stewart @ 2016-05-26 20:21 UTC (permalink / raw) To: buildroot Thomas, On Thu, May 26, 2016 at 12:12 PM Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > It seems like it uses cgo, so you need a dependency on BR2_TOOLCHAIN_HAS_THREADS here + the corresponding Config.in comment. Noted, will fix for the next revision. > Why is this thing needed? I see you use it below, but it seems weird. In the build scripts they use git commands to grab the commit ID. I replaced this in this series with a hardcoded git commit reference since we're not using git to fetch the source tree anymore, instead we're using tarballs. But including the commit hash the code originated from allows checking the revision properly down the line. This value is included in version outputs on the actual device - i.e. ?runc -v? > Indentation for the help text is one tab + two spaces. Will fix. > I guess you should use HOST_GO_TARGET_ENV, as in http://patchwork.ozlabs.org/patch/626824/ . I looked at that and it didn't seem quite right, and that's liable to change down the line, so I copied it here. Keeping the envs package specific seems to me the most reliable solution. > What is the export doing here? Setting up GOPATH and GOBIN, this is also why I use the && on the next lines, otherwise we would have to write the env statement for all of those lines. The purpose of those commands is to place the ?runc? sources at the proper location within the gopath tree. Go requires a tree to locate code. So inside runc, assuming there's ?pkg/foo?, the path would be ?github.com/opencontainers/runc/pkg/foo?. The GOPATH filesystem tree must match this. To fix this problem, we build a ?vendor? tree with dependencies, and then simlink ?runc? into the proper location within that tree. This allows Go to resolve everything properly. The same applies to the other patches in this series. I will fix the formatting issues and other things mentioned above and respin in a couple of days. Best, Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160526/71929d97/attachment.html> ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/3] runc: new package 2016-05-26 20:21 ` Christian Stewart @ 2016-05-27 5:23 ` Thomas Petazzoni 0 siblings, 0 replies; 12+ messages in thread From: Thomas Petazzoni @ 2016-05-27 5:23 UTC (permalink / raw) To: buildroot Hello, On Thu, 26 May 2016 20:21:34 +0000, Christian Stewart wrote: > > Why is this thing needed? I see you use it below, but it seems weird. > In the build scripts they use git commands to grab the commit ID. I replaced > this in this series with a hardcoded git commit reference since we're not using > git to fetch the source tree anymore, instead we're using tarballs. But > including the commit hash the code originated from allows checking the revision > properly down the line. > This value is included in version outputs on the actual device - i.e. ?runc -v? Then why not use the <pkg>_VERSION variable directly, like: -X main.gitCommit=$(RUNC_VERSION) > > I guess you should use HOST_GO_TARGET_ENV, as in http://patchwork.ozlabs.org/patch/626824/ . > I looked at that and it didn't seem quite right, and that's liable to change > down the line, so I copied it here. Keeping the envs package specific seems to > me the most reliable solution. I'm sorry, I don't understand what you mean here. The go package conveniently provides a variable for packages to use, to avoid mistakes and duplications in packages. When such a variable exists, it should definitely be used, and packages should not duplicate similar information, as it's a big maintenance burden down the line. But when I look at your v3, I see that you are now using HOST_GO_TARGET_ENV. So I really don't understand what you said here. > > What is the export doing here? > Setting up GOPATH and GOBIN, this is also why I use the && on the next lines, > otherwise we would have to write the env statement for all of those lines. > The purpose of those commands is to place the ?runc? sources at the proper > location within the gopath tree. Go requires a tree to locate code. So inside > runc, assuming there's ?pkg/foo?, the path would be > ?github.com/opencontainers/runc/pkg/foo?. The GOPATH filesystem tree must match > this. > To fix this problem, we build a ?vendor? tree with dependencies, and then > simlink ?runc? into the proper location within that tree. This allows Go to > resolve everything properly. > The same applies to the other patches in this series. > I will fix the formatting issues and other things mentioned above and respin in > a couple of days. OK, thanks for the explanation. I see you fixed the export as well, which is good. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 2/3] docker-containerd: new package 2016-05-25 23:31 [Buildroot] [PATCH v3 0/3] Add docker engine support Christian Stewart 2016-05-25 23:31 ` [Buildroot] [PATCH v3 1/3] runc: new package Christian Stewart @ 2016-05-25 23:31 ` Christian Stewart 2016-05-26 19:29 ` Thomas Petazzoni 2016-05-25 23:31 ` [Buildroot] [PATCH v3 3/3] docker-engine: " Christian Stewart 2 siblings, 1 reply; 12+ messages in thread From: Christian Stewart @ 2016-05-25 23:31 UTC (permalink / raw) To: buildroot docker-containerd is a daemon and API for controlling and managing runC containers. Note: fixes for arm64 (armv8) will be included in the next Docker release. A temporary cherry-pick of relevant arm64 fixes is available: Commit f51d17f7 from https://github.com/paralin/buildroot.git https://containerd.tools/ Signed-off-by: Christian Stewart <christian@paral.in> --- Changes since v1: - Use proper github URL syntax Changes since v2: - Fix hash on download file --- package/Config.in | 1 + package/docker-containerd/Config.in | 8 ++++ package/docker-containerd/docker-containerd.hash | 2 + package/docker-containerd/docker-containerd.mk | 48 ++++++++++++++++++++++++ 4 files changed, 59 insertions(+) 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 diff --git a/package/Config.in b/package/Config.in index 6c513ba..c8365f8 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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" diff --git a/package/docker-containerd/Config.in b/package/docker-containerd/Config.in new file mode 100644 index 0000000..6b3760d --- /dev/null +++ b/package/docker-containerd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_DOCKER_CONTAINERD + bool "docker-containerd" + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS + select BR2_PACKAGE_RUNC + help + containerd is a daemon to control runC. + + https://github.com/docker/containerd diff --git a/package/docker-containerd/docker-containerd.hash b/package/docker-containerd/docker-containerd.hash new file mode 100644 index 0000000..be0d856 --- /dev/null +++ b/package/docker-containerd/docker-containerd.hash @@ -0,0 +1,2 @@ +# Computed locally +sha256 f9dfeaba17064f279a7dfe89f0ef6763ee45b0a57c03aa423da2af340fba198d v0.2.1.tar.gz diff --git a/package/docker-containerd/docker-containerd.mk b/package/docker-containerd/docker-containerd.mk new file mode 100644 index 0000000..9225143 --- /dev/null +++ b/package/docker-containerd/docker-containerd.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# docker-containerd +# +################################################################################ + +DOCKER_CONTAINERD_VERSION = v0.2.1 +DOCKER_CONTAINERD_VERSION_COMMIT = ca47f7e76a93e9b3768ed084d62318e85bd9f4b2 +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 runc + +DOCKER_CONTAINERD_MAKE_ENV = \ + GOBIN="$(@D)/bin" \ + GOPATH="$(@D)/vendor" \ + GOARCH=$(GO_GOARCH) \ + CGO_ENABLED=1 + +DOCKER_CONTAINERD_GLDFLAGS = \ + -X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION_COMMIT) \ + -extldflags '-static' + +define DOCKER_CONTAINERD_CONFIGURE_CMDS + # Put sources at prescribed GOPATH location. + export $(DOCKER_CONTAINERD_MAKE_ENV) && \ + mkdir -p $$GOPATH/src/github.com/docker && \ + ln -s $(@D) $$GOPATH/src/github.com/docker/containerd && \ + mkdir -p $$GOPATH/src/github.com/opencontainers && \ + ln -s $(RUNC_SRCDIR) $$GOPATH/src/github.com/opencontainers/runc +endef + +define DOCKER_CONTAINERD_BUILD_CMDS + cd $(@D) && export $(DOCKER_CONTAINERD_MAKE_ENV) && \ + $(HOST_DIR)/usr/bin/go build -v -o $(@D)/bin/ctr -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./ctr && \ + $(HOST_DIR)/usr/bin/go build -v -o $(@D)/bin/containerd -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./containerd && \ + $(HOST_DIR)/usr/bin/go build -v -o $(@D)/bin/containerd-shim -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./containerd-shim +endef + +define DOCKER_CONTAINERD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(TARGET_DIR)/usr/bin/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 +endef + +$(eval $(generic-package)) -- 2.7.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 2/3] docker-containerd: new package 2016-05-25 23:31 ` [Buildroot] [PATCH v3 2/3] docker-containerd: " Christian Stewart @ 2016-05-26 19:29 ` Thomas Petazzoni 2016-05-26 23:10 ` Christian Stewart 0 siblings, 1 reply; 12+ messages in thread From: Thomas Petazzoni @ 2016-05-26 19:29 UTC (permalink / raw) To: buildroot Hello, On Wed, 25 May 2016 16:31:21 -0700, Christian Stewart wrote: > docker-containerd is a daemon and API for controlling and managing runC > containers. > > Note: fixes for arm64 (armv8) will be included in the next Docker > release. A temporary cherry-pick of relevant arm64 fixes is available: > > Commit f51d17f7 from https://github.com/paralin/buildroot.git Well, then either include the required patch, or disable the build on arm64 for now. > diff --git a/package/docker-containerd/Config.in b/package/docker-containerd/Config.in > new file mode 100644 > index 0000000..6b3760d > --- /dev/null > +++ b/package/docker-containerd/Config.in > @@ -0,0 +1,8 @@ > +config BR2_PACKAGE_DOCKER_CONTAINERD > + bool "docker-containerd" > + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS Thread dependency or not? > + select BR2_PACKAGE_RUNC > + help > + containerd is a daemon to control runC. Identation: one tab + two spaces. > diff --git a/package/docker-containerd/docker-containerd.mk b/package/docker-containerd/docker-containerd.mk > new file mode 100644 > index 0000000..9225143 > --- /dev/null > +++ b/package/docker-containerd/docker-containerd.mk > @@ -0,0 +1,48 @@ > +################################################################################ > +# > +# docker-containerd > +# > +################################################################################ > + > +DOCKER_CONTAINERD_VERSION = v0.2.1 > +DOCKER_CONTAINERD_VERSION_COMMIT = ca47f7e76a93e9b3768ed084d62318e85bd9f4b2 Same question: why? > +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 runc So runc is really a build-time dependency? > + > +DOCKER_CONTAINERD_MAKE_ENV = \ > + GOBIN="$(@D)/bin" \ > + GOPATH="$(@D)/vendor" \ > + GOARCH=$(GO_GOARCH) \ > + CGO_ENABLED=1 Usage of HOST_GO_TARGET_ENV ? > + > +DOCKER_CONTAINERD_GLDFLAGS = \ > + -X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION_COMMIT) \ Why does it need this information? > + -extldflags '-static' > + > +define DOCKER_CONTAINERD_CONFIGURE_CMDS > + # Put sources at prescribed GOPATH location. > + export $(DOCKER_CONTAINERD_MAKE_ENV) && \ Why this export ? > + mkdir -p $$GOPATH/src/github.com/docker && \ > + ln -s $(@D) $$GOPATH/src/github.com/docker/containerd && \ > + mkdir -p $$GOPATH/src/github.com/opencontainers && \ > + ln -s $(RUNC_SRCDIR) $$GOPATH/src/github.com/opencontainers/runc Same remarks as with the other package: *) Why is this needed *) No need for the &&, these can be independent commands, one after the other. > +endef > + > +define DOCKER_CONTAINERD_BUILD_CMDS > + cd $(@D) && export $(DOCKER_CONTAINERD_MAKE_ENV) && \ Why is export needed? Just do: $(DOCKER_CONTAINERD_MAKE_ENV) $(HOST_DIR)/usr/bin/go ... > + $(HOST_DIR)/usr/bin/go build -v -o $(@D)/bin/ctr -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./ctr && \ > + $(HOST_DIR)/usr/bin/go build -v -o $(@D)/bin/containerd -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./containerd && \ > + $(HOST_DIR)/usr/bin/go build -v -o $(@D)/bin/containerd-shim -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./containerd-shim No need for the &&, make these independent commands. Is the "cd $(@D)" really needed ? Isn't it possible to do: $(HOST_DIR)/usr/bin/go build -v -o $(@D)/bin/containerd-shim -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" $(@D)/containerd-shim > +endef > + > +define DOCKER_CONTAINERD_INSTALL_TARGET_CMDS > + $(INSTALL) -D -m 0755 $(TARGET_DIR)/usr/bin/runc $(TARGET_DIR)/usr/bin/docker-runc Why are you doing this? If it really needs to be called docker-runc, why not just a symbolic link ? > + $(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 > +endef > + > +$(eval $(generic-package)) Thanks, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 2/3] docker-containerd: new package 2016-05-26 19:29 ` Thomas Petazzoni @ 2016-05-26 23:10 ` Christian Stewart 0 siblings, 0 replies; 12+ messages in thread From: Christian Stewart @ 2016-05-26 23:10 UTC (permalink / raw) To: buildroot Thomas, On Thu, May 26, 2016 12:29 PM, Thomas Petazzoni thomas.petazzoni at free-electrons.com wrote: > Thread dependency or not? Yes, added comment + dep as with runc. > So runc is really a build-time dependency? Only if I copy runc to docker-runc, but given it's a symbolic link, I removed this in the next version. If I use an absolute path to make the symbolic link, will this cause problems on the target device? > No need for the &&, make these independent commands. If I do this, I will need to duplicate the env statement as well as the cd. And no, it's not possible to specify an absolute path to build. This produces this kind of error: can't load package: package /home/paralin/Documents/skiff/workspaces/default/output/build/docker-containerd-v0.2.1/ctr: import ?/home/paralin/Documents/skiff/workspaces/default/output/build/docker-containerd-v0.2.1/ctr?: cannot import absolute path Other than that, will apply these changes and respin. Best, Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160526/4d116b1b/attachment.html> ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/3] docker-engine: new package 2016-05-25 23:31 [Buildroot] [PATCH v3 0/3] Add docker engine support Christian Stewart 2016-05-25 23:31 ` [Buildroot] [PATCH v3 1/3] runc: new package Christian Stewart 2016-05-25 23:31 ` [Buildroot] [PATCH v3 2/3] docker-containerd: " Christian Stewart @ 2016-05-25 23:31 ` Christian Stewart 2016-05-26 19:34 ` Thomas Petazzoni 2 siblings, 1 reply; 12+ messages in thread From: Christian Stewart @ 2016-05-25 23:31 UTC (permalink / raw) To: buildroot Docker is a platform to build, ship, and run applications in portable containers. Signed-off-by: Christian Stewart <christian@paral.in> --- Changes since v1: - use call github to build source URL Changes since v2: - fix hashes --- package/Config.in | 1 + package/docker-engine/Config.in | 70 ++++++++++++++++++++ package/docker-engine/docker-engine.hash | 2 + package/docker-engine/docker-engine.mk | 110 +++++++++++++++++++++++++++++++ 4 files changed, 183 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 diff --git a/package/Config.in b/package/Config.in index c8365f8..b54c5b9 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1631,6 +1631,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/dcron/Config.in" source "package/debianutils/Config.in" endif + source "package/docker-engine/Config.in" source "package/docker-containerd/Config.in" source "package/cgroupfs-mount/Config.in" source "package/dsp-tools/Config.in" diff --git a/package/docker-engine/Config.in b/package/docker-engine/Config.in new file mode 100644 index 0000000..e25b16b --- /dev/null +++ b/package/docker-engine/Config.in @@ -0,0 +1,70 @@ +config BR2_PACKAGE_DOCKER_ENGINE + bool "docker-engine" + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS + 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" + +if BR2_PACKAGE_DOCKER_ENGINE_DAEMON + +config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_AUFS + bool "aufs filesystem driver" + depends on BR2_USE_WCHAR # aufs-util + depends on BR2_USE_MMU # aufs-util + depends on BR2_TOOLCHAIN_HAS_THREADS # aufs-util + select BR2_PACKAGE_AUFS_UTIL + help + Build the aufs filesystem driver for Docker. + +config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS + bool "btrfs filesystem driver" + depends on BR2_USE_WCHAR # btrfs-progs + depends on BR2_USE_MMU # btrfs-progs + depends on BR2_TOOLCHAIN_HAS_THREADS # btrfs-progs + select BR2_PACKAGE_BTRFS_PROGS + help + Build the btrfs filesystem driver for Docker. + +config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER + bool "devicemapper filesystem driver" + depends on BR2_TOOLCHAIN_HAS_THREADS # lvm2 + depends on BR2_USE_MMU # lvm2 + depends on !BR2_STATIC_LIBS # lvm2 + select BR2_PACKAGE_LVM2 + select BR2_PACKAGE_LVM2_APP_LIBRARY + help + Build the devicemapper filesystem driver for Docker. + +config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS + bool "vfs filesystem driver" + depends on BR2_USE_WCHAR # gvfs + depends on BR2_USE_MMU # gvfs + depends on BR2_TOOLCHAIN_HAS_THREADS # gvfs + select BR2_PACKAGE_GVFS + help + Build the vfs filesystem driver for Docker. + +endif + +endif diff --git a/package/docker-engine/docker-engine.hash b/package/docker-engine/docker-engine.hash new file mode 100644 index 0000000..7b93669 --- /dev/null +++ b/package/docker-engine/docker-engine.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 04de3750738b6f888f03520fb67db22e95e8a8e016ae901428e6c5791c9841cc docker-engine-v1.11.1.tar.gz diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk new file mode 100644 index 0000000..0dc6b46 --- /dev/null +++ b/package/docker-engine/docker-engine.mk @@ -0,0 +1,110 @@ +################################################################################ +# +# docker-engine +# +################################################################################ + +DOCKER_ENGINE_VERSION = v1.11.1 +DOCKER_ENGINE_VERSION_COMMIT = 5604cbed50d51c4039b1abcb1cf87c4e01bce924 +DOCKER_ENGINE_SITE = $(call github,docker,docker,$(DOCKER_ENGINE_VERSION)) + +DOCKER_ENGINE_LICENSE = Apache-2.0 +DOCKER_ENGINE_LICENSE_FILES = LICENSE + +DOCKER_ENGINE_DEPENDENCIES = host-go docker-containerd + +DOCKER_ENGINE_MAKE_ENV = \ + GOBIN="$(@D)/bin" \ + GOPATH="$(@D)/vendor" \ + GOARCH=$(GO_GOARCH) \ + CGO_ENABLED=1 \ + CGO_NO_EMULATION=1 + +DOCKER_ENGINE_GLDFLAGS = \ + -X main.GitCommit=$(DOCKER_ENGINE_VERSION_COMMIT) \ + -X main.Version=$(DOCKER_ENGINE_VERSION) \ + -extldflags '-static' + +DOCKER_ENGINE_BUILD_TAGS = cgo exclude_graphdriver_zfs + +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) +DOCKER_ENGINE_BUILD_TAGS += seccomp +DOCKER_ENGINE_DEPENDENCIES += libseccomp +endif + +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y) +DOCKER_ENGINE_BUILD_TAGS += daemon +endif + +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y) +DOCKER_ENGINE_BUILD_TAGS += experimental +endif + +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y) +DOCKER_ENGINE_DEPENDENCIES += btrfs-progs +else +DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_btrfs +endif + +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_AUFS),y) +DOCKER_ENGINE_DEPENDENCIES += aufs-util +else +DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_aufs +endif + +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y) +DOCKER_ENGINE_DEPENDENCIES += lvm2 +else +DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_devicemapper +endif + +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS),y) +DOCKER_ENGINE_DEPENDENCIES += gvfs +else +DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_vfs +endif + +define DOCKER_ENGINE_CONFIGURE_CMDS + # Put sources at prescribed GOPATH location. + export $(DOCKER_ENGINE_MAKE_ENV) && \ + $(SED) '/^clean$$/d' $(@D)/hack/vendor.sh && \ + cd $(@D) && bash ./hack/vendor.sh && \ + mkdir -p $(@D)/vendor/src/github.com/docker && \ + ln -s $(@D) $(@D)/vendor/src/github.com/docker/docker && \ + ln -s $(DOCKER_CONTAINERD_SRCDIR) $(@D)/vendor/src/github.com/docker/containerd && \ + mkdir -p $$GOPATH/src/github.com/opencontainers && \ + ln -s $(RUNC_SRCDIR) $(@D)/vendor/src/github.com/opencontainers/runc +endef + +define DOCKER_ENGINE_BUILD_CMDS + cd $(@D) && export $(DOCKER_ENGINE_MAKE_ENV) && \ + $(HOST_DIR)/usr/bin/go build -v -o $(@D)/bin/docker -tags "$(DOCKER_ENGINE_BUILD_TAGS)" -ldflags "$(DOCKER_ENGINE_GLDFLAGS)" ./docker +endef + +define DOCKER_ENGINE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/docker $(TARGET_DIR)/usr/bin/docker +endef + +define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \ + $(TARGET_DIR)/usr/lib/systemd/system/docker.service + $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.socket \ + $(TARGET_DIR)/usr/lib/systemd/system/docker.socket + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ + ln -fs ../../../../usr/lib/systemd/system/docker.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/docker.service +endef + +define DOCKER_ENGINE_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 $(@D)/contrib/init/sysvinit-redhat/docker \ + $(TARGET_DIR)/etc/init.d/S61docker + mkdir -p $(TARGET_DIR)/etc/sysconfig + $(INSTALL) -D -m 644 $(@D)/contrib/init/sysvinit-redhat/docker.sysconfig \ + $(TARGET_DIR)/etc/sysconfig/docker.sysconfig +endef + +define DOCKER_ENGINE_USERS + - - docker -1 * - - - Docker Application Container Framework +endef + +$(eval $(generic-package)) -- 2.7.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/3] docker-engine: new package 2016-05-25 23:31 ` [Buildroot] [PATCH v3 3/3] docker-engine: " Christian Stewart @ 2016-05-26 19:34 ` Thomas Petazzoni 0 siblings, 0 replies; 12+ messages in thread From: Thomas Petazzoni @ 2016-05-26 19:34 UTC (permalink / raw) To: buildroot Hello, Great, docker in Buildroot! :-) On Wed, 25 May 2016 16:31:22 -0700, Christian Stewart wrote: > + source "package/docker-engine/Config.in" > source "package/docker-containerd/Config.in" Alphabetic ordering please. > source "package/cgroupfs-mount/Config.in" > source "package/dsp-tools/Config.in" > diff --git a/package/docker-engine/Config.in b/package/docker-engine/Config.in > new file mode 100644 > index 0000000..e25b16b > --- /dev/null > +++ b/package/docker-engine/Config.in > @@ -0,0 +1,70 @@ > +config BR2_PACKAGE_DOCKER_ENGINE > + bool "docker-engine" > + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS Thread dependency? > + 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 You need to replicate the dependency of util-linux here, so: depends on BR2_USE_WCHAR depends on BR2_USE_MMU > + help > + Docker is a platform to build, ship, > + and run applications as lightweight containers. > + > + https://github.com/docker/docker Indentation of the help text: one tab + two spaces. > + > +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. Identation: one tab + two spaces, plus wrap at 72 characters. > + > +config BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL > + bool "build experimental features" > + > +if BR2_PACKAGE_DOCKER_ENGINE_DAEMON > + > +config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_AUFS > + bool "aufs filesystem driver" > + depends on BR2_USE_WCHAR # aufs-util > + depends on BR2_USE_MMU # aufs-util > + depends on BR2_TOOLCHAIN_HAS_THREADS # aufs-util > + select BR2_PACKAGE_AUFS_UTIL > + help > + Build the aufs filesystem driver for Docker. Didn't you say in your cover letter that the AUFS support was not integrated? The symbol BR2_PACKAGE_AUFS_UTIL does not exist in Buildroot. > + > +config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS > + bool "btrfs filesystem driver" > + depends on BR2_USE_WCHAR # btrfs-progs > + depends on BR2_USE_MMU # btrfs-progs > + depends on BR2_TOOLCHAIN_HAS_THREADS # btrfs-progs > + select BR2_PACKAGE_BTRFS_PROGS > + help > + Build the btrfs filesystem driver for Docker. Indentation. > + > +config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER > + bool "devicemapper filesystem driver" > + depends on BR2_TOOLCHAIN_HAS_THREADS # lvm2 > + depends on BR2_USE_MMU # lvm2 > + depends on !BR2_STATIC_LIBS # lvm2 > + select BR2_PACKAGE_LVM2 > + select BR2_PACKAGE_LVM2_APP_LIBRARY > + help > + Build the devicemapper filesystem driver for Docker. Ditto. > + > +config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS > + bool "vfs filesystem driver" Is the driver called vfs or gvfs ? > + depends on BR2_USE_WCHAR # gvfs > + depends on BR2_USE_MMU # gvfs > + depends on BR2_TOOLCHAIN_HAS_THREADS # gvfs > + select BR2_PACKAGE_GVFS > + help > + Build the vfs filesystem driver for Docker. Ditto. > + > +endif > + > +endif > diff --git a/package/docker-engine/docker-engine.hash b/package/docker-engine/docker-engine.hash > new file mode 100644 > index 0000000..7b93669 > --- /dev/null > +++ b/package/docker-engine/docker-engine.hash > @@ -0,0 +1,2 @@ > +# Locally calculated > +sha256 04de3750738b6f888f03520fb67db22e95e8a8e016ae901428e6c5791c9841cc docker-engine-v1.11.1.tar.gz > diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk > new file mode 100644 > index 0000000..0dc6b46 > --- /dev/null > +++ b/package/docker-engine/docker-engine.mk > @@ -0,0 +1,110 @@ > +################################################################################ > +# > +# docker-engine > +# > +################################################################################ > + > +DOCKER_ENGINE_VERSION = v1.11.1 > +DOCKER_ENGINE_VERSION_COMMIT = 5604cbed50d51c4039b1abcb1cf87c4e01bce924 Same question :) > +DOCKER_ENGINE_SITE = $(call github,docker,docker,$(DOCKER_ENGINE_VERSION)) > + > +DOCKER_ENGINE_LICENSE = Apache-2.0 > +DOCKER_ENGINE_LICENSE_FILES = LICENSE > + > +DOCKER_ENGINE_DEPENDENCIES = host-go docker-containerd > + > +DOCKER_ENGINE_MAKE_ENV = \ > + GOBIN="$(@D)/bin" \ > + GOPATH="$(@D)/vendor" \ > + GOARCH=$(GO_GOARCH) \ > + CGO_ENABLED=1 \ > + CGO_NO_EMULATION=1 HOST_GO_TARGET_ENV usage > + > +DOCKER_ENGINE_GLDFLAGS = \ > + -X main.GitCommit=$(DOCKER_ENGINE_VERSION_COMMIT) \ > + -X main.Version=$(DOCKER_ENGINE_VERSION) \ > + -extldflags '-static' > + > +DOCKER_ENGINE_BUILD_TAGS = cgo exclude_graphdriver_zfs > + > +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) > +DOCKER_ENGINE_BUILD_TAGS += seccomp > +DOCKER_ENGINE_DEPENDENCIES += libseccomp > +endif > + > +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y) > +DOCKER_ENGINE_BUILD_TAGS += daemon > +endif > + > +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y) > +DOCKER_ENGINE_BUILD_TAGS += experimental > +endif > + > +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y) > +DOCKER_ENGINE_DEPENDENCIES += btrfs-progs So docker links with some btrfs library? > +else > +DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_btrfs > +endif > + > +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_AUFS),y) > +DOCKER_ENGINE_DEPENDENCIES += aufs-util > +else > +DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_aufs > +endif > + > +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y) > +DOCKER_ENGINE_DEPENDENCIES += lvm2 > +else > +DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_devicemapper > +endif > + > +ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS),y) > +DOCKER_ENGINE_DEPENDENCIES += gvfs > +else > +DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_vfs > +endif > + > +define DOCKER_ENGINE_CONFIGURE_CMDS > + # Put sources at prescribed GOPATH location. > + export $(DOCKER_ENGINE_MAKE_ENV) && \ > + $(SED) '/^clean$$/d' $(@D)/hack/vendor.sh && \ > + cd $(@D) && bash ./hack/vendor.sh && \ > + mkdir -p $(@D)/vendor/src/github.com/docker && \ > + ln -s $(@D) $(@D)/vendor/src/github.com/docker/docker && \ > + ln -s $(DOCKER_CONTAINERD_SRCDIR) $(@D)/vendor/src/github.com/docker/containerd && \ > + mkdir -p $$GOPATH/src/github.com/opencontainers && \ > + ln -s $(RUNC_SRCDIR) $(@D)/vendor/src/github.com/opencontainers/runc Same comments as with other packages. > +endef > + > +define DOCKER_ENGINE_BUILD_CMDS > + cd $(@D) && export $(DOCKER_ENGINE_MAKE_ENV) && \ > + $(HOST_DIR)/usr/bin/go build -v -o $(@D)/bin/docker -tags "$(DOCKER_ENGINE_BUILD_TAGS)" -ldflags "$(DOCKER_ENGINE_GLDFLAGS)" ./docker > +endef Ditto. > + > +define DOCKER_ENGINE_INSTALL_TARGET_CMDS > + $(INSTALL) -D -m 0755 $(@D)/bin/docker $(TARGET_DIR)/usr/bin/docker > +endef > + > +define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD > + $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \ > + $(TARGET_DIR)/usr/lib/systemd/system/docker.service > + $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.socket \ > + $(TARGET_DIR)/usr/lib/systemd/system/docker.socket > + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ > + ln -fs ../../../../usr/lib/systemd/system/docker.service \ > + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/docker.service > +endef > + > +define DOCKER_ENGINE_INSTALL_INIT_SYSV > + $(INSTALL) -D -m 755 $(@D)/contrib/init/sysvinit-redhat/docker \ > + $(TARGET_DIR)/etc/init.d/S61docker Is the sysvinit-redhat script actually working in Buildroot with a Busybox shell? > + mkdir -p $(TARGET_DIR)/etc/sysconfig Not needed $(INSTALL) -D does it for you. > + $(INSTALL) -D -m 644 $(@D)/contrib/init/sysvinit-redhat/docker.sysconfig \ > + $(TARGET_DIR)/etc/sysconfig/docker.sysconfig > +endef > + > +define DOCKER_ENGINE_USERS > + - - docker -1 * - - - Docker Application Container Framework > +endef > + > +$(eval $(generic-package)) Thanks a lot! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-05-27 5:23 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-05-25 23:31 [Buildroot] [PATCH v3 0/3] Add docker engine support Christian Stewart 2016-05-25 23:31 ` [Buildroot] [PATCH v3 1/3] runc: new package Christian Stewart 2016-05-26 19:12 ` Thomas Petazzoni 2016-05-26 19:51 ` Geoff Levand 2016-05-26 20:01 ` Thomas Petazzoni 2016-05-26 20:21 ` Christian Stewart 2016-05-27 5:23 ` Thomas Petazzoni 2016-05-25 23:31 ` [Buildroot] [PATCH v3 2/3] docker-containerd: " Christian Stewart 2016-05-26 19:29 ` Thomas Petazzoni 2016-05-26 23:10 ` Christian Stewart 2016-05-25 23:31 ` [Buildroot] [PATCH v3 3/3] docker-engine: " Christian Stewart 2016-05-26 19:34 ` Thomas Petazzoni
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.