package/docker-engine: carry the tini init symlink

tini can be used standalone, not just as an init injected by docker.
As such, creating the docker-engine's init symlink does not belong to
tini itself, but to docker-engine.

This will also help later, when we allow docker-engine to use another
init alternative, catatonit (already paclkaged in Buildroot, but not
integrated with docker).

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Christian Stewart <christian@aperture.us>
Cc: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Tested-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Yann E. MORIN
2025-02-15 11:33:46 +01:00
committed by Julien Olivain
parent ce3dae7a83
commit cb97f6a9b3
2 changed files with 8 additions and 2 deletions

View File

@@ -35,6 +35,14 @@ DOCKER_ENGINE_DEPENDENCIES += systemd
DOCKER_ENGINE_TAGS += systemd journald
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT),y)
define DOCKER_ENGINE_INIT
mkdir -p $(TARGET_DIR)/usr/libexec/docker
ln -sf ../../bin/tini $(TARGET_DIR)/usr/libexec/docker/docker-init
endef
DOCKER_ENGINE_POST_INSTALL_TARGET_HOOKS += DOCKER_ENGINE_INIT
endif
ifneq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
DOCKER_ENGINE_TAGS += exclude_graphdriver_btrfs
endif

View File

@@ -31,8 +31,6 @@ endef
define TINI_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/bin/tini $(TARGET_DIR)/usr/bin/tini
mkdir -p $(TARGET_DIR)/usr/libexec/docker
ln -sf ../../bin/tini $(TARGET_DIR)/usr/libexec/docker/docker-init
endef
# Tini's CMakeLists.txt is not suitable for Buildroot.