aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker/docker_%.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/docker/docker_%.bbappend')
-rw-r--r--recipes-containers/docker/docker_%.bbappend53
1 files changed, 53 insertions, 0 deletions
diff --git a/recipes-containers/docker/docker_%.bbappend b/recipes-containers/docker/docker_%.bbappend
new file mode 100644
index 0000000..7e041d2
--- /dev/null
+++ b/recipes-containers/docker/docker_%.bbappend
@@ -0,0 +1,53 @@
+SRCREV_docker = "49bf474f9ed7ce7143a59d1964ff7b7fd9b52178"
+SRCREV_libnetwork="0f534354b813003a754606689722fe253101bc4e"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI = "\
+ git://github.com/docker/docker.git;nobranch=1;name=docker \
+ git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \
+ file://docker.init \
+ file://hi.Dockerfile \
+ file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \
+ file://0001-docker.service-add-clear-linux-oci-runtime.patch \
+ "
+
+# Apache-2.0 for docker
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
+
+DOCKER_VERSION = "1.13.0"
+RDEPENDS_${PN} += "kernel-module-vhost kernel-module-vhost-net"
+
+do_compile() {
+ # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
+ # docker to download its dependencies but rather
+ # use dependencies packaged independently.
+ cd ${S}
+ rm -rf .gopath
+ mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")"
+ ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
+
+ mkdir -p .gopath/src/github.com/docker
+ ln -sf ../../../../../libnetwork .gopath/src/github.com/docker/libnetwork
+
+ export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+ export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
+ cd -
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ # in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056
+ export DOCKER_BUILDTAGS='exclude_graphdriver_btrfs exclude_graphdriver_devicemapper'
+
+ # this is the unsupported built structure
+ # that doesn't rely on an existing docker
+ # to build this:
+ DOCKER_GITCOMMIT="${SRCREV}" \
+ ./hack/make.sh dynbinary
+
+ # build the proxy
+ go build -o ${S}/docker-proxy github.com/docker/libnetwork/cmd/proxy
+}
+