Commit Graph

24 Commits

Author SHA1 Message Date
Bruce Ashfield
9d98a04b26 docker: unify common parts of docker-ce and docker-moby recipes
Now that docker-ce is being built from the same repos as docker-moby,
the only unique things in the recipes are the SRCREVs.

We move the common packaging, compile/install routines and configuration
to the .inc files.

We also move the patches to the generic 'files' directory, so they
can be shared.

If we there are SRCREV bumps in the future that diverge moby and
docker, we'll hold patches in their named directorys and tweak
the compile/install routines as necessary.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-04-29 17:09:31 -04:00
Martin Jansa
87b9e054ff docker: move docker.init back to files directory to use it from docker-moby
* it was moved for some reason in:
  http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/commit/?id=929372946aeb85953d1ca6acc428d73fbac52a56

  but docker-moby uses it as well and now started to fail with:
  ERROR: docker-moby-19.03.12+git9dc6525e6118a25fab2be322d1914740ea842495-r0
  do_fetch: Fetcher failure: Unable to find file file://docker.init
  anywhere. ..

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-07-02 12:09:10 -04:00
Bruce Ashfield
929372946a docker-ce/docker-moby: fixup GO compiler calls
With oe-core commit c23f9e80492e4b [tcmode-default: use go-binary-native
by default], we must explictly call the proper cross go binary, versus
just the go-native variant.

These builds were working by luck, since the go compiler was capable of
building the target binaries previously (in its build-from-source
creation). We fixup the calls and we no longer see fpu build issues:

fatal error: gnu/stubs-soft.h: No such file or directory

    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~

This commit also moves the docker-ce patches from "files" to a named
directory to reduce confusion.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-07-01 12:43:16 -04:00
Phil Coval
a3b36fbb1f docker: fix init script for busybox
Observed issue using BusyBox v1.30.1 not supporting bashism

/etc/init.d/docker.init: line 43: syntax error: unexpected redirection

Change-Id: I9f73564cfb56352fbf7d80723ea938b66eceb5c7
Forwarded: https://lists.yoctoproject.org/g/meta-virtualization
Signed-off-by: Philippe Coval <rzr@users.sf.net>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-02-27 16:54:54 -05:00
Bruce Ashfield
6c48fddd30 docker/moby: 19.03.x update
Updating the moby recipes to the match the 19.03.x updates pulled
into docker/docker-ce

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-09-26 01:30:59 -04:00
Stefan Agner
e7787cb01b docker-ce: improve hardcoded CC for cross compile
Since commit applied in moby [61a3285 Support cross-compile for arm]
it hardcoded var-CC to support cross-compile for arm

Correct it with "${parameter:-word}" format, it is helpful for user
define toolchains

(Use Default Values.  If parameter is unset or null, the expansion of
word is substituted.  Otherwise, the value of parameter is substituted.)

61a3285864

This fixes a build issue seen when building docker-ce:
  exec: "aarch64-linux-gnu-gcc": executable file not found in $PATH

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-09-23 02:30:19 -04:00
Hongxu Jia
f73eb0b2c9 docker: improve hardcoded CC for cross compile
Since commit applied in moby [61a3285 Support cross-compile for arm]
it hardcoded var-CC to support cross-compile for arm

Correct it with "${parameter:-word}" format, it is helpful for user
define toolchains

(Use Default Values.  If parameter is unset or null, the expansion of
word is substituted.  Otherwise, the value of parameter is substituted.)

61a3285864

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-07-22 11:36:16 -04:00
Ting Yu
5043d6263a Add pidfile flag to store dockerd PID in /var/run/dockerd.pid
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-12-04 18:15:11 -05:00
Chin Huat Ang
4ef7f8b758 docker: fix broken init script
Fix numerous docker.init issues such as missing runtime dependency
util-linux-unshare, incomplete handling of start/stop etc. operations
and minor typos.

Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-11-20 16:01:38 -05:00
Bruce Ashfield
86db36879f docker/docker-ce: uprev to 18.09
Infrastructure changes triggered updated to supporting parts of the
docker stack, so to make sure that everything stays in sync we update
to the 18.09 release.

There were some minor build differences in this update, but in the
end, things are better since we can use some more of the Make infrastructure
versus calling 'go build' directly.

Also, docker-ce and docker are now virtually the same, except for the
moby based docker pulling in the cli and libnetwork repos independently.
There should be virtually no difference between the results, but we still
keep the two variants for flexibility.

We also drop the unused/legacy 'hi.Dockerfile'.

Tested with both kubernetes and docker unit tests.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-11-05 10:20:54 -05:00
Bruce Ashfield
b1c810c812 docker: remove stale .service file
We use the systemd service file from within the docker git
repo. Removing the unused recipe space version, since it is
invalid and causes confusion.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-08-02 22:57:14 -04:00
Bruce Ashfield
ab3965109b docker: restructure to build docker-proxy using provided Makefile
Rather than invoking go directly to build docker-proxy, we can use
the libnetwork Make infrastructure. This picks up our exported go
enviroment variables, and other sysroot flags.

We also apply one patch to ensure that the cross-go toolchain is
used, and that the proper build flags are used.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-04-09 10:25:48 -04:00
Bruce Ashfield
a5074cecf1 docker: uprev to 18.03.0
Uprev the docker daemon, proxy and cli to 18.03.0.

The SRCREVs for these updates come from the versions logged in the
docker-ce 18.03.0 release. The docker-ce recipe has a pure docker-ce
single repository build, but here, we continue to assemble the individual
parts for maximum flexibility.

Along with the uprev, we add new dependencies required to build the new
version; libtool and pkcconfig (although unused by the recipe itself).

Finally we switch to a Makefile based build of the cli to allow the
commit and docker version to be properly captured in the docker executable.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-04-02 00:34:18 -04:00
Jason Wessel
01a8d45370 nets, docker, runc, oci-*tools: go.bbclass compile fixes
Recently in the oe-core the go.bbclass changed and requires the
defition of the GO_IMPORT variable.  This was intended to simplify how
the compilation works with go packages and it is still a work in
progress.

This patch set makes the recipes compatible to generate the same end
result as before using the new go.bbclass from oe-core.

Any patches that were included in the recipes had to have the paths
adjusted because the new go.bbclass manipulates the notion of S to be
S + "src" + "$GO_IMPORT" internally for the purpose of unpack, patch
and compile.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-09-14 09:49:00 -04:00
Jan Kiszka
de50b56087 docker: Fix and update sysvinit script
Fix daemonization, align args with docker.service, fix line breaks in
log file - and fix INITSCRIPT_PARAMS (there is no variable
OS_DEFAULT_INITSCRIPT_PARAMS).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-07-17 15:48:43 -04:00
Jason Wessel
3c435ae8f0 docker: Uprev to latest based on runc 1.0-rc3
The build method for docker client changed where by the docker cli is
now required to be pulled in from a separate git tree to be built.

The integration patch to cross compile was also upreved since some
parts of it were accepted upstream while other parts have not been
accepted at this time.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-07-13 13:53:58 -04:00
Bruce Ashfield
c5cd21af5f docker: remove obsolete docker-registry recipe
The docker v1 registry has long been depreciated and moved into the
docker distribution library.

The registry is run via the docker CLI and not through a standalone
server.

This change removes the old registry and adds a .service file + package
for docker registry in the main docker recipe. Anyone that wants to
run a local registry can install the docker-registry package and the
service will start.

Note: No full config.yml file is provided, since the default are sane.
If tweaks are required, we can use ENV vars or consider adding a
config overlay.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-27 15:25:39 -05:00
Mark Asselstine
e764db31c1 docker: fixup builds broken by uprev to 1.13
This new version of docker starts to assume that go 1.7 is
used. Specifically in go 1.7 golang.org/x/net/context has been merged
so the include is starting to be shortened to simply "context" which
does not work when using go 1.6. We can continue to use go 1.6 by
using the full pkg path.

Additionally the docker-proxy is not built when using the hacks build
mechanism, as we do to build docker (ie. we don't build docker in a
docker container). We could probably find a way to build docker-proxy
using the build hacks, but for now we will simply drop docker-proxy
from the package. In an embedded env. using the proxy doesn't make a
lot of sense anyways.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-01-20 15:49:06 -05:00
Bruce Ashfield
6f17a76ac1 docker: uprev to 1.11.1
Updating docker to the 1.11.1 release, which uses the open container initiative
components.

With this udpate, we drop patches that are no longer required, and adjust the
install/strip routines to not look for obselete components.

There are now 4 binaries required for docker to work:

  - docker
  - docker-containerd
  - docker-containerd-shim
  - docker-runc

The new containerd and runc recipes provide the latter, while docker provides
the cli and daemon.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-05-02 14:02:42 -04:00
Zongchun Yu
acbe424171 docker: uprev to 1.9.0
Signed-off-by: Zongchun Yu <zongchun.yu@nxp.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-04-19 15:51:14 -04:00
Amy Fong
fe357d8c80 docker uprev 1.6.2
Uprev docker to 1.6.2

go-capability is upreved to a later git commit
go-dbus is upreved to version 2
go-distribution-digest is added as a new dependency. Only the
   digest part of go-distribution is needed/kept here,
   hence go-distribution-digest
go-logrus is upreved to 0.7.1

Remove PR since it's no longer used

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-06-14 23:00:09 -04:00
Amy Fong
960aff31ba docker engine not running
In yocto builds, preprocessing of binaries can happen after the install
phase.  Some of these can modify the size/sha1sum of the binaries.
e.g. A new .gnu_debuglink can happen

docker will not start because of these modifications. Docker initially
does a sha1sum of dockerinit to identify the dockerinit that it was built
with, this is done for security and for compatibility reasons. Since
this checking is disabled, we should rely on rpm tests for validation
of the binary instead.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-11 00:22:37 -04:00
Bruce Ashfield
19ca5c408a docker: add sysvinit script
Adding a basic sysvinit script to docker .. for those that still use
sysvinit!

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-08 13:27:19 -04:00
Amy Fong
e8af612774 Package docker
Adding docker (Linux container runtime)

Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-03-17 09:46:32 -04:00