meta-virtualization/recipes-containers/docker/docker.inc
Bruce Ashfield d19fda3743 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>
2019-03-21 10:47:46 -04:00

57 lines
1.6 KiB
PHP

DEPENDS = " \
go-cli \
go-pty \
go-context \
go-mux \
go-patricia \
go-logrus \
go-fsnotify \
go-dbus \
go-capability \
go-systemd \
btrfs-tools \
sqlite3 \
go-distribution \
compose-file \
go-connections \
notary \
grpc-go \
libtool-native \
libtool \
"
DEPENDS_append_class-target = " lvm2"
RDEPENDS_${PN} = "util-linux util-linux-unshare iptables \
${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \
bridge-utils \
ca-certificates \
"
RDEPENDS_${PN} += "virtual/containerd virtual/runc"
RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat"
inherit pkgconfig
PACKAGECONFIG ??= ""
PACKAGECONFIG[seccomp] = "seccomp,,libseccomp"
inherit systemd update-rc.d
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.service','',d)}"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}"
INITSCRIPT_NAME_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}"
INITSCRIPT_PARAMS_${PN} = "defaults"
inherit useradd
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "-r docker"
COMPATIBLE_HOST = "^(?!(qemu)?mips).*"
# DO NOT STRIP docker
INHIBIT_PACKAGE_STRIP = "1"
INSANE_SKIP_${PN} += "ldflags textrel"