summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2017-02-26 22:28:47 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-02-26 22:28:47 -0500
commitc85b181e7e907793008f58ca20ae49ec68d2c4b5 (patch)
tree3a0195d873ce32ff072cd2900021896489aa245d /recipes-containers/docker
parent7d6284a079748f919e3e0b8116649cfa5ff8ee8f (diff)
downloadmeta-virtualization-c85b181e7e907793008f58ca20ae49ec68d2c4b5.tar.gz
docker: add docker-proxy
Most (all) distros package docker-proxy along with the docker CLI and daemon .. largely due to the fact that it is required to run the docker registry. docker-proxy is part of the libnetwork repository, so we add it to the docker recipe as a separate git repo and integrate it into the build and packaging process. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/docker')
-rw-r--r--recipes-containers/docker/docker_git.bb17
1 files changed, 14 insertions, 3 deletions
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index c8ab45a0..da1aef6a 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -18,9 +18,11 @@ DESCRIPTION = "Linux container runtime \
18 subtle and/or glaring issues. \ 18 subtle and/or glaring issues. \
19 " 19 "
20 20
21SRCREV = "49bf474f9ed7ce7143a59d1964ff7b7fd9b52178" 21SRCREV_docker = "49bf474f9ed7ce7143a59d1964ff7b7fd9b52178"
22SRCREV_libnetwork="0f534354b813003a754606689722fe253101bc4e"
22SRC_URI = "\ 23SRC_URI = "\
23 git://github.com/docker/docker.git;nobranch=1 \ 24 git://github.com/docker/docker.git;nobranch=1;name=docker \
25 git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \
24 file://docker.init \ 26 file://docker.init \
25 file://hi.Dockerfile \ 27 file://hi.Dockerfile \
26 file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \ 28 file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \
@@ -33,7 +35,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
33S = "${WORKDIR}/git" 35S = "${WORKDIR}/git"
34 36
35DOCKER_VERSION = "1.13.0" 37DOCKER_VERSION = "1.13.0"
36PV = "${DOCKER_VERSION}+git${SRCREV}" 38PV = "${DOCKER_VERSION}+git${SRCREV_docker}"
37 39
38DEPENDS = " \ 40DEPENDS = " \
39 go-cross-${TARGET_ARCH} \ 41 go-cross-${TARGET_ARCH} \
@@ -103,6 +105,10 @@ do_compile() {
103 rm -rf .gopath 105 rm -rf .gopath
104 mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" 106 mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")"
105 ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" 107 ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
108
109 mkdir -p .gopath/src/github.com/docker
110 ln -sf ../../../../../libnetwork .gopath/src/github.com/docker/libnetwork
111
106 export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" 112 export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
107 export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" 113 export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
108 cd - 114 cd -
@@ -120,6 +126,9 @@ do_compile() {
120 # to build this: 126 # to build this:
121 DOCKER_GITCOMMIT="${SRCREV}" \ 127 DOCKER_GITCOMMIT="${SRCREV}" \
122 ./hack/make.sh dynbinary 128 ./hack/make.sh dynbinary
129
130 # build the proxy
131 go build -o ${S}/docker-proxy github.com/docker/libnetwork/cmd/proxy
123} 132}
124 133
125inherit systemd update-rc.d 134inherit systemd update-rc.d
@@ -135,6 +144,7 @@ do_install() {
135 mkdir -p ${D}/${bindir} 144 mkdir -p ${D}/${bindir}
136 cp ${S}/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker 145 cp ${S}/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker
137 cp ${S}/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd 146 cp ${S}/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd
147 cp ${S}/docker-proxy ${D}/${bindir}/docker-proxy
138 148
139 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 149 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
140 install -d ${D}${systemd_unitdir}/system 150 install -d ${D}${systemd_unitdir}/system
@@ -162,3 +172,4 @@ RDEPENDS_${PN}-contrib += "bash"
162 172
163# DO NOT STRIP docker 173# DO NOT STRIP docker
164INHIBIT_PACKAGE_STRIP = "1" 174INHIBIT_PACKAGE_STRIP = "1"
175INSANE_SKIP_${PN} += "ldflags"