diff mbox series

[2/2] package/docker-engine: add optional dependency on tini

Message ID 20241010132912.3061663-2-fiona.klute@gmx.de
State Accepted
Headers show
Series [1/2] package/tini: restore use as docker-init | expand

Commit Message

Fiona Klute Oct. 10, 2024, 1:29 p.m. UTC
From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>

To provide an init process for containers if requested e.g. with
"docker run --init", Docker relies on tini to provide the init
binary. package/tini already provides the required
/usr/libexec/docker/docker-init symlink, the new option just selects
tini if enabled to prevent confusion over why docker-init is missing.

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
Adding an option seems like the least invasive version to me. An
unconditional dependency would work too, I'd be surprised if anyone
using Docker on the target has an issue with the extra ~66KB. Or drop
the patch, being able to install tini (patch 1) is the critical
part. ;-)

 package/docker-engine/Config.in | 11 +++++++++++
 1 file changed, 11 insertions(+)

--
2.45.2
diff mbox series

Patch

diff --git a/package/docker-engine/Config.in b/package/docker-engine/Config.in
index 49a002a647..e03ecceeff 100644
--- a/package/docker-engine/Config.in
+++ b/package/docker-engine/Config.in
@@ -48,6 +48,17 @@  config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS
 	help
 	  Build the vfs filesystem driver for Docker.

+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT
+	bool "support docker-init"
+	select BR2_PACKAGE_TINI # runtime
+	help
+	  Support providing a minimal init process for containers,
+	  using tini. Required to use "docker run --init".
+
+	  This does not change the Docker engine build, the
+	  docker-init symlink is provided by the tini package
+	  itself. This option only adds the dependency.
+
 endif

 comment "docker-engine needs a glibc or musl toolchain w/ threads, headers >= 3.17"