* [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init
@ 2024-10-10 13:29 Fiona Klute via buildroot
2024-10-10 13:29 ` [Buildroot] [PATCH 2/2] package/docker-engine: add optional dependency on tini Fiona Klute via buildroot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fiona Klute via buildroot @ 2024-10-10 13:29 UTC (permalink / raw)
To: buildroot; +Cc: Fiona Klute (WIWA), Christian Stewart
From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
Commit 24cac9c4e6a36fd14b263a8eecf7ae7d58ab5a59 "system: add tini as
init system" made BR2_PACKAGE_TINI depend on BR2_INIT_TINI. This is
incorrect: tini is not only needed when building a container image
using Buildroot, but also to run Docker containers on Buildroot
systems using another another init system, if Docker is configured to
provide an init process for the container (e.g. with "docker run
--init"). The tini package already provides the "docker-init" symlink
required for that.
Example error without tini installed:
$ docker run --rm -ti --init alpine
docker: Error response from daemon: exec: "docker-init": executable file not found in $PATH.
Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
package/tini/Config.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/package/tini/Config.in b/package/tini/Config.in
index bca8ad8e96..719e1e1f22 100644
--- a/package/tini/Config.in
+++ b/package/tini/Config.in
@@ -1,7 +1,6 @@
config BR2_PACKAGE_TINI
bool "tini"
depends on BR2_USE_MMU # fork()
- depends on BR2_INIT_TINI
help
tini is a simple but valid init binary to
act as PID 1 for containers.
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] package/docker-engine: add optional dependency on tini
2024-10-10 13:29 [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init Fiona Klute via buildroot
@ 2024-10-10 13:29 ` Fiona Klute via buildroot
2024-10-10 18:25 ` [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init Christian Stewart via buildroot
2024-10-10 21:40 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Klute via buildroot @ 2024-10-10 13:29 UTC (permalink / raw)
To: buildroot; +Cc: Fiona Klute (WIWA), Christian Stewart
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(+)
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"
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init
2024-10-10 13:29 [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init Fiona Klute via buildroot
2024-10-10 13:29 ` [Buildroot] [PATCH 2/2] package/docker-engine: add optional dependency on tini Fiona Klute via buildroot
@ 2024-10-10 18:25 ` Christian Stewart via buildroot
2024-10-10 21:40 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Christian Stewart via buildroot @ 2024-10-10 18:25 UTC (permalink / raw)
To: Fiona Klute; +Cc: Buildroot Mailing List
[-- Attachment #1.1: Type: text/plain, Size: 1507 bytes --]
Hi all,
On Thu, Oct 10, 2024, 6:29 AM Fiona Klute <fiona.klute@gmx.de> wrote:
> From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
>
> Commit 24cac9c4e6a36fd14b263a8eecf7ae7d58ab5a59 "system: add tini as
> init system" made BR2_PACKAGE_TINI depend on BR2_INIT_TINI. This is
> incorrect: tini is not only needed when building a container image
> using Buildroot, but also to run Docker containers on Buildroot
> systems using another another init system, if Docker is configured to
> provide an init process for the container (e.g. with "docker run
> --init"). The tini package already provides the "docker-init" symlink
> required for that.
>
> Example error without tini installed:
>
> $ docker run --rm -ti --init alpine
> docker: Error response from daemon: exec: "docker-init": executable file
> not found in $PATH.
>
> Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
> ---
> package/tini/Config.in | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/package/tini/Config.in b/package/tini/Config.in
> index bca8ad8e96..719e1e1f22 100644
> --- a/package/tini/Config.in
> +++ b/package/tini/Config.in
> @@ -1,7 +1,6 @@
> config BR2_PACKAGE_TINI
> bool "tini"
> depends on BR2_USE_MMU # fork()
> - depends on BR2_INIT_TINI
> help
> tini is a simple but valid init binary to
> act as PID 1 for containers.
>
Agreed
Reviewed-by: Christian Stewart <christian@aperture.us>
Best regards,
Christian
[-- Attachment #1.2: Type: text/html, Size: 2289 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init
2024-10-10 13:29 [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init Fiona Klute via buildroot
2024-10-10 13:29 ` [Buildroot] [PATCH 2/2] package/docker-engine: add optional dependency on tini Fiona Klute via buildroot
2024-10-10 18:25 ` [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init Christian Stewart via buildroot
@ 2024-10-10 21:40 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-10 21:40 UTC (permalink / raw)
To: Fiona Klute via buildroot; +Cc: Fiona Klute, Christian Stewart
On Thu, 10 Oct 2024 15:29:11 +0200
Fiona Klute via buildroot <buildroot@buildroot.org> wrote:
> From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
>
> Commit 24cac9c4e6a36fd14b263a8eecf7ae7d58ab5a59 "system: add tini as
> init system" made BR2_PACKAGE_TINI depend on BR2_INIT_TINI. This is
> incorrect: tini is not only needed when building a container image
> using Buildroot, but also to run Docker containers on Buildroot
> systems using another another init system, if Docker is configured to
> provide an init process for the container (e.g. with "docker run
> --init"). The tini package already provides the "docker-init" symlink
> required for that.
>
> Example error without tini installed:
>
> $ docker run --rm -ti --init alpine
> docker: Error response from daemon: exec: "docker-init": executable file not found in $PATH.
>
> Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
> ---
> package/tini/Config.in | 1 -
> 1 file changed, 1 deletion(-)
Thanks, both applied. On PATCH 2/2, I wasn't 100% sure, but it's simple
enough, clarifies this dependency that isn't entirely obvious, and can
always be reworked/reverted if other people think it wasn't the right
solution.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-10 21:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 13:29 [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init Fiona Klute via buildroot
2024-10-10 13:29 ` [Buildroot] [PATCH 2/2] package/docker-engine: add optional dependency on tini Fiona Klute via buildroot
2024-10-10 18:25 ` [Buildroot] [PATCH 1/2] package/tini: restore use as docker-init Christian Stewart via buildroot
2024-10-10 21:40 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox