mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
docker: ensure that sysvinit and systemd are exclusive
The sysvinit functionality conflicts with the docker daemon settings required for the systemd docker.socket. Ensure that the sysvinit capabilities are only enabled if systemd is not present. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
e8ff0486ad
commit
8bc4cf804f
7
recipes-containers/docker/README
Normal file
7
recipes-containers/docker/README
Normal file
|
@ -0,0 +1,7 @@
|
|||
if containerd is starting docker, and it is interfering with standalone
|
||||
docker operation, you may need to kill the running daemon and restart
|
||||
it:
|
||||
|
||||
% ps axf | grep docker | grep -v grep | awk '{print "kill -9 " $1}' | sh
|
||||
% systemctl stop docker
|
||||
% systemctl start docker
|
|
@ -120,8 +120,7 @@ do_install() {
|
|||
# replaces one copied from above with one that uses the local registry for a mirror
|
||||
install -m 644 ${S}/src/import/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system
|
||||
rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm
|
||||
fi
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
|
||||
else
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init
|
||||
fi
|
||||
|
@ -142,8 +141,10 @@ SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',
|
|||
SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.socket','',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)}"
|
||||
# inverted logic warning. We ony want the sysvinit init to be installed if systemd
|
||||
# is NOT in the distro features
|
||||
INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','systemd','', '${PN}',d)}"
|
||||
INITSCRIPT_NAME:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','', 'docker.init',d)}"
|
||||
INITSCRIPT_PARAMS:${PN} = "defaults"
|
||||
|
||||
inherit useradd
|
||||
|
|
Loading…
Reference in New Issue
Block a user