Commit Graph

35 Commits

Author SHA1 Message Date
Bruce Ashfield
7d6284a079 runc/containerd: create virtual/runc and virtual/containerd
Since there are two implementations of runc and containerd that may
not always be in sync, the docker variant, and the opencontainers
variable, we create a virtual/* namespace for these components.

Anything requiring runc or containerd should set a preferred provider
to get the desired/tested variant.

We set the default provider to the docker variants, since they are
the primary use case for these components.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-20 02:06:22 -05:00
Bruce Ashfield
6d05401c38 docker: use .service file from contrib
Oru existing docker.service file is using an out of date command. We
can use the contrib .service file instead .. and hopefully it will
stay up to date.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-17 13:26:09 -05:00
Fathi Boudra
c478d69c1b docker: downgrade lxc/docker-registry/rt-tests to suggests
Regular users don't need lxc, docker-registry and rt-tests on the target.
These tools aren't even needed or provide additional features when running
docker at runtime. They also increase the size of the image uneccessarily.

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-09 09:15:25 -05:00
Mark Asselstine
b2c365c371 docker: fixup failing build
Docker is failing to build because it is attempting to download
missing go dependencies. Add new recipes for missing dependencies and
update existing recipes to ensure the version defined in docker's
vendor.conf is available.

Note that this fixes the build only. At this time many docker
functions are working, such as 'docker image', 'docker pull' and more,
but 'docker run' is currently failing.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-09 09:14:27 -05:00
Mark Asselstine
2ef58c264b go-cross: add ${TARGET_ARCH} to PN
Since we are building a cross tool which produces something which is
ARCH specific we should stick to the <toolname>-cross-<arch> naming
convention. A variant of this patch has been floating around for a
while but with the changes around per recipe sysroots, distributed
builds, shared builds... we are best served to adopt this convention
now.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-09 09:14:27 -05:00
Amarnath Valluri
0ea0ae357a docker: Replace /usr/share with ${datadir}
Make use of bitbake variable where appropriate, this makes the recipe portable.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-09 09:13:56 -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
Fathi Boudra
0b631bf014 docker: update to 1.13.0 release
Adjust SRCREV and DOCKER_VERSION to match docker 1.13.0 release.

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-01-20 08:56:10 -05:00
Fathi Boudra
0a98df4c3b docker: cosmetic - fix indentation
cosmetic only, no changes in behavior:
* align all the DEPENDS, better readability
* fix indentation in do_install(): space -> tab

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-01-03 10:29:24 -05:00
Fathi Boudra
f430ad9e5a docker: use a switch to set GOARCH based on TARGET_ARCH value
It allows to:
* easily extend future architecture added/supported
* tune arm architecture and set GOARM as appropriate

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-01-03 10:29:24 -05:00
Fathi Boudra
6706ce690c docker: update description
* reword docker officially supported hosts section
* bump minimal required kernel from 3.8 to 3.10

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-01-03 10:29:23 -05:00
Fathi Boudra
521840c676 docker: update to docker 1.12.5 release
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-01-03 10:29:23 -05:00
Stefan Lengfeld
011c4d611b docker: install script config-check.sh
The script /usr/share/docker/config-check.sh is very useful to test all
kernel requirements for docker. A lot of embedded boards will use a
custom kernel config that does not have all kernel features enabled by
default. Install the script so kernel developer can easily enable the
missing features.

Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-11-03 15:42:08 -04:00
Mark Asselstine
db5ef80602 docker: update license md5sum
Seems upstream adjusted their LICENSE file. The license is still
Apache version 2 so no worries about having to update the LICENSE
string for the recipe.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-08-31 17:33:23 -04:00
Mark Asselstine
951c83c74d docker: cgroup-lite is not required with systemd
Systemd takes care of setting up the various cgroup mounts at boot,
and likewise the tearing down of these at shutdown. It is therefor a
useless dependency when we are using systemd.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-08-31 17:33:23 -04:00
Bruce Ashfield
1fd5a596ed containers: uprev docker (1.12.0), runc (1.0.0-rc) and containerd (0.2.2)
Bumping the version of docker and dependencies. This gets us closer to
runc 1.0, which is the foundation for future OCI efforts.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-07-27 00:16:53 -04:00
Bruce Ashfield
7d41ad142d docker: fix GNU hash QA warning
The docker build isn't properly using CFLAGS/LDFLAGS, which triggers the following
QA error:

  ERROR: docker-1.11.1+git5604cbed50d51c4039b1abcb1cf87c4e01bce924-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: 'docker/1.11.1+git5604cbed50d51c4039b1abcb1cf87c4e01bce924-r0/packages-split/docker/usr/bin/docker' [ldflags]
  ERROR: docker-1.11.1+git5604cbed50d51c4039b1abcb1cf87c4e01bce924-r0 do_package_qa: QA run found fatal errors. Please consider fixing them
  ERROR: docker-1.11.1+git5604cbed50d51c4039b1abcb1cf87c4e01bce924-r0 do_package_qa: Function failed: do_package_qa
  ERROR: Logfile of failure stored in: tmp/work/core2-64-overc-linux/docker/1.11.1+git5604cbed50d51c4039b1abcb1cf87c4e01bce924-r0/temp/log.do_package_qa.63906
  ERROR: Task meta-virtualization/recipes-containers/docker/docker_git.bb:do_package_qa (meta-virtualization/recipes-containers/docker/docker_git.bb:do_package_qa) failed with exit code '1'

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-07-22 17:20:52 -04:00
Yunguo Wei
01aa8f1819 docker: override GOROOT at build time
Usually $GOROOT is set by go tool, but if sstate is specified, $GOROOT
is set to the path in the first project. If docker is built in the
another project(with same SSTATE_DIR) later, and the first project is removed,
the following error will be seen:

| go: cannot find GOROOT directory:
/path/to/previous/project/bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/x86_64-wrs-linux/go

This commit is overriding $GOROOT stored in the go tool in sstate cache,
making sure it is set to the correct path in current project.

See more information here: https://golang.org/doc/install#install

Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-05-30 14:19:39 -04:00
Bruce Ashfield
77e846b14f docker: drop obselete dependencies
We no longer need go-net and go-sqlite for the docker build and
runtime. The upstream repos are no longer properly fetching, so
we can simply drop the recipes and dependency.

If they are ever needed in the future, we can revisit the upstream
source for them.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-05-18 14:20:29 -04:00
Derek Straka
a3617f2464 globally replace 'base_contains' calls with 'bb.utils.contains'
The 'base_contains' is now deprecated and only kept as a compatibility method.  It will be removed in future releases.

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-05-03 22:21:25 -04: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
Bruce Ashfield
2da5cb4bfc docker: remove dependency on explicit go-cross version
go-cross-1.3 is old, and doesn't link properly with the latest 2.26
binutils.

To get things building again, and to start the docker uprev, we simply
depend on go-cross and line docker up with the rest of the go users.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-02-11 09:41:07 -05:00
Amy Fong
c861012e9c docker: fix paths for cross compile
Some of the cgo variables were pointing to host paths and not target
Fix install rules - binaries can be installed to a subdirectory.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-13 11:29:57 -04:00
Amy Fong
d0ef47396d Enable go-cross 1.3 to coexist with later versions
Since we need go 1.3 to co-exist with later versions (ie 1.4),
package go-cross_1.3 as go-cross-1.3_1.3.

go 1.3 will be installed to a different path than go-cross, this requires
go packages needing go 1.3 to set its PATH to:
        export PATH=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/go-1.3:$PATH

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-10-13 11:29:57 -04:00
Amy Fong
84b521fe4a docker: update SRC_URI
Author: Amy Fong <amy.fong@windriver.com>
Date:   Wed Sep 16 00:12:10 2015 -0400

    docker: update SRC_URI

    branch=release is no longer valid in the git tree,
    updating the branch to v1.6.2

    Signed-off-by: Amy Fong <amy.fong@windriver.com>

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-09-16 16:10:05 -04:00
Amy Fong
26b2724b43 golang: use oe-meta-go
From b101a0c7ce6ef1eb41bef786831e58fa4d1b069f Mon Sep 17 00:00:00 2001
From: Amy Fong <amy.fong@windriver.com>
Date: Mon, 27 Jul 2015 14:10:20 -0400
Subject: [PATCH] golang: use oe-meta-go

Update meta-virtualization to use go package from oe-meta-go.
The package golang-cross is go-cross in the oe-meta-go.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-07-29 11:07:17 -04:00
Bruce Ashfield
a89c11a3d8 docker: add dependencies for out of box experience
Docker searching and launch looks for iptables, so we add it to the
rdepends.

To actually launch a container, netfilter nat and dm-think are often
required, so we make those modules rrecommends.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-06-22 13:14:42 -04:00
Amy Fong
2113be0a1d golang-cross: add ccache support
golang doesn't work with ccache. In the current state, a lot of parsing
happens where it'll grab the first string in CC or LD and uses that for
its builds. When ccache is enabled, it results in trying to do builds
with just ccache.

The brokeness is seen when building with apps that uses cgo, like docker.
To enable ccache to work, some string comparisons and changes to parsing
had to be made.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-06-19 15:31:40 -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
Jason Wessel
5ef987dc6d docker: Disable CCACHE because golang will fail on some hosts
The following is the type of error you see when CCACHE is enabled.

| ---> Making bundle: dynbinary (in bundles/1.5.0-dev/dynbinary)
| go build runtime/cgo: no buildable Go source files in /opt/proj/tmp/sysroots/x86_64-linux/usr/lib/x86_64-wrs-linux/go/src/pkg/runtime/cgo
| WARNING: /opt/proj/tmp/work/core2-64-wrs-linux/docker/1.5.0+git2243e32cbbf1c9809c262a7376d34ca43a7a36dc-r0/temp/do_compile/run.do_compile.19967:1 exit 1 from
|   DOCKER_GITCOMMIT="2243e32cbbf1c9809c262a7376d34ca43a7a36dc" ./hack/make.sh dynbinary
| ERROR: Function failed: do_compile (log file is located at /opt/proj/tmp/work/core2-64-wrs-linux/docker/1.5.0+git2243e32cbbf1c9809c262a7376d34ca43a7a36dc-r0/temp/do_compile/log.do_compile.19967)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-03-30 23:45:18 -04:00
Amy Fong
718987175a docker: avoid fetching dependencies
Docker's build process will clone missing dependencies which
circumvents the bitbake fetcher. This is a bad thing in many ways, for
example this will not respect BB_NO_NETWORK and DL_DIR settings. To
work around this we are able to provide recipes for each of the
missing dependencies.

The dependencies are all in GO and are required to be added to the
sysroot such that the docker build can find them via GOPATH at build
time. The docker recipe was updated to add these new packages as
dependencies and the explicit clone of go-cli was removed.

After these change we are able to complete the build with networking
disabled after completing a fetchall. Docker functionality was tested
on an image built with these changes and it functions as it did
before.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Amy Fong <amy.fong@windriver.com>
2015-03-17 09:46:33 -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