docs icon indicating copy to clipboard operation
docs copied to clipboard

Tini Recommendation

Open scariabpc opened this issue 1 year ago • 2 comments

Is this a docs issue?

  • [X] My issue is about the documentation content or website

Type of issue

I can't find what I'm looking for

Description

It seems like there is a better solution with Tini that Docker supports. Any reason this page doesn't mention it? It seems like a better solution than using wait because it should propagate the signals to the child processes.

Location

https://docs.docker.com/engine/containers/multi-service_container/

Suggestion

Include a Tini example and best practices.

scariabpc avatar Sep 25 '24 01:09 scariabpc

No reason I don't think - it probably just hasn't come up before!

dvdksn avatar Oct 02 '24 11:10 dvdksn

FWIW (not sure if relevant in this context); Docker Engine ships with a build of Tini (but the binary name is docker-init). When using the --init flag on docker run and docker create, the docker daemon mounts tini into the container, and sets it as main process to act as a reaper.

For example;

docker run -dit --init busybox
a428c601d0739c41dc8da410343c7b5a00e4199949b6671619962344e109aac2

docker top a428c601d0739c41dc8da410343c7b5a00e4199949b6671619962344e109aac2
UID     PID       PPID      C    STIME   TTY     TIME       CMD
root    25165     25145     0    12:49   ?       00:00:00   /sbin/docker-init -- sh
root    25189     25165     0    12:49   ?       00:00:00   sh

thaJeztah avatar Oct 14 '24 12:10 thaJeztah