summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker/docker-ce_git.bb
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2019-03-21 10:47:46 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2019-03-21 10:47:46 -0400
commitd19fda374317daab673ed1b78f68010c14eebf47 (patch)
tree80e7893092c970365e69fc516d93c4b4272b28ce /recipes-containers/docker/docker-ce_git.bb
parent9e4957d36aff17e8c0b22e5499653572cc44adf3 (diff)
downloadmeta-virtualization-d19fda374317daab673ed1b78f68010c14eebf47.tar.gz
docker: consolidate common depends/options
The split between docker-ce and docker (moby) was initially quite different, and docker-ce was more of a reference versus a supported / working package. Upstream has evolved such that both are valid options, and may be chosen due to different requirements. Rather than duplicating all the settings, we can move the dependencies, init, rdepends, users, etc, into a .inc file and share them. For now, we keep the build separate, since depending on the uprev status, they still can require different build options and packaging. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/docker/docker-ce_git.bb')
-rw-r--r--recipes-containers/docker/docker-ce_git.bb55
1 files changed, 4 insertions, 51 deletions
diff --git a/recipes-containers/docker/docker-ce_git.bb b/recipes-containers/docker/docker-ce_git.bb
index a0d774ad..042d3a41 100644
--- a/recipes-containers/docker/docker-ce_git.bb
+++ b/recipes-containers/docker/docker-ce_git.bb
@@ -9,8 +9,8 @@ DESCRIPTION = "Linux container runtime \
9 large-scale web deployments, database clusters, continuous deployment \ 9 large-scale web deployments, database clusters, continuous deployment \
10 systems, private PaaS, service-oriented architectures, etc. \ 10 systems, private PaaS, service-oriented architectures, etc. \
11 . \ 11 . \
12 This package contains the daemon and client. Using docker.io is \ 12 This package contains the daemon and client, which are \
13 officially supported on x86_64 and arm (32-bit) hosts. \ 13 officially supported on x86_64 and arm hosts. \
14 Other architectures are considered experimental. \ 14 Other architectures are considered experimental. \
15 . \ 15 . \
16 Also, note that kernel version 3.10 or above is required for proper \ 16 Also, note that kernel version 3.10 or above is required for proper \
@@ -26,6 +26,8 @@ SRC_URI = "\
26 file://docker.init \ 26 file://docker.init \
27 " 27 "
28 28
29require docker.inc
30
29# Apache-2.0 for docker 31# Apache-2.0 for docker
30LICENSE = "Apache-2.0" 32LICENSE = "Apache-2.0"
31LIC_FILES_CHKSUM = "file://src/import/components/engine/LICENSE;md5=9740d093a080530b5c5c6573df9af45a" 33LIC_FILES_CHKSUM = "file://src/import/components/engine/LICENSE;md5=9740d093a080530b5c5c6573df9af45a"
@@ -37,43 +39,10 @@ S = "${WORKDIR}/git"
37DOCKER_VERSION = "18.09.3-ce" 39DOCKER_VERSION = "18.09.3-ce"
38PV = "${DOCKER_VERSION}+git${SRCREV_docker}" 40PV = "${DOCKER_VERSION}+git${SRCREV_docker}"
39 41
40DEPENDS = " \
41 go-cli \
42 go-pty \
43 go-context \
44 go-mux \
45 go-patricia \
46 go-logrus \
47 go-fsnotify \
48 go-dbus \
49 go-capability \
50 go-systemd \
51 btrfs-tools \
52 sqlite3 \
53 go-distribution \
54 compose-file \
55 go-connections \
56 notary \
57 grpc-go \
58 libtool-native \
59 libtool \
60 "
61
62PACKAGES =+ "${PN}-contrib" 42PACKAGES =+ "${PN}-contrib"
63 43
64DEPENDS_append_class-target = " lvm2"
65RDEPENDS_${PN} = "util-linux util-linux-unshare iptables \
66 ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \
67 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \
68 bridge-utils \
69 ca-certificates \
70 "
71RDEPENDS_${PN} += "virtual/containerd virtual/runc"
72
73RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat"
74DOCKER_PKG="github.com/docker/docker" 44DOCKER_PKG="github.com/docker/docker"
75 45
76inherit systemd update-rc.d
77inherit go 46inherit go
78inherit goarch 47inherit goarch
79inherit pkgconfig 48inherit pkgconfig
@@ -126,14 +95,6 @@ do_compile() {
126 VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" make dynbinary 95 VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" make dynbinary
127} 96}
128 97
129SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
130SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.service','',d)}"
131SYSTEMD_AUTO_ENABLE_${PN} = "enable"
132
133INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}"
134INITSCRIPT_NAME_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}"
135INITSCRIPT_PARAMS_${PN} = "defaults"
136
137do_install() { 98do_install() {
138 mkdir -p ${D}/${bindir} 99 mkdir -p ${D}/${bindir}
139 cp ${S}/src/import/components/cli/build/docker ${D}/${bindir}/docker 100 cp ${S}/src/import/components/cli/build/docker ${D}/${bindir}/docker
@@ -157,15 +118,7 @@ do_install() {
157 install -m 0755 ${S}/src/import/components/engine/contrib/check-config.sh ${D}${datadir}/docker/ 118 install -m 0755 ${S}/src/import/components/engine/contrib/check-config.sh ${D}${datadir}/docker/
158} 119}
159 120
160inherit useradd
161USERADD_PACKAGES = "${PN}"
162GROUPADD_PARAM_${PN} = "-r docker"
163
164FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" 121FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker"
165 122
166FILES_${PN}-contrib += "${datadir}/docker/check-config.sh" 123FILES_${PN}-contrib += "${datadir}/docker/check-config.sh"
167RDEPENDS_${PN}-contrib += "bash" 124RDEPENDS_${PN}-contrib += "bash"
168
169# DO NOT STRIP docker
170INHIBIT_PACKAGE_STRIP = "1"
171INSANE_SKIP_${PN} += "ldflags"