Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker_notes:init [2024-08-24 Sat wk34 22:13] – [docker builtin basic init] baumkpdocker_notes:init [2024-10-13 Sun wk41 12:34] (current) – [References] baumkp
Line 77: Line 77:
 In the docker run command the ''%%--init%%'' flag can be used to [[https://docs.docker.com/reference/cli/docker/container/run/#init|specify an init process]] is used.  This causes docker to use [[https://github.com/krallin/tini|tini]] as an init system on process 1, instead of the first docker command.  Tini is a very basic init system specifically for containers that reaps zombie processes and preforms signal forwarding. In the docker run command the ''%%--init%%'' flag can be used to [[https://docs.docker.com/reference/cli/docker/container/run/#init|specify an init process]] is used.  This causes docker to use [[https://github.com/krallin/tini|tini]] as an init system on process 1, instead of the first docker command.  Tini is a very basic init system specifically for containers that reaps zombie processes and preforms signal forwarding.
  
 +In docker compose add the directive ''init: true'' see example below:
 +++++docker-compose.yml snippet|
 +<code>services:                                                                                                           
 +    ntfy:
 +      image: binwiederhier/ntfy
 +      init: true
 +      container_name: ntfy </code>
 +++++
  
   *[[https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/|Docker and the PID 1 zombie reaping problem]]   *[[https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/|Docker and the PID 1 zombie reaping problem]]
Line 82: Line 90:
   *[[https://www.baeldung.com/ops/docker-init-parameter|How to Use –init Parameter in Docker Run Command]]   *[[https://www.baeldung.com/ops/docker-init-parameter|How to Use –init Parameter in Docker Run Command]]
 =====References===== =====References=====
-  *[[https://github.com/just-containers/s6-overlay| just-containers/s6-overlay]] (**Version 3.2.0.0** as of 2024-06-29, last checked 2024-07-27), note only a minor change since previous version+  *[[https://github.com/just-containers/s6-overlay| just-containers/s6-overlay]] (**Version 3.2.0.2** as of 2024-10-11, last checked 2024-10-13), note only a minor change since previous version
   *[[https://skarnet.org/software/s6-rc/s6-rc-compile.html|The s6-rc-compile program]] Describes the functionality of the S6-rc system   *[[https://skarnet.org/software/s6-rc/s6-rc-compile.html|The s6-rc-compile program]] Describes the functionality of the S6-rc system
   *[[https://forum.level1techs.com/t/easy-to-follow-beginner-guide-on-s6-starter-pack/178411|Easy to follow Beginner Guide on s6 Starter Pack]]   *[[https://forum.level1techs.com/t/easy-to-follow-beginner-guide-on-s6-starter-pack/178411|Easy to follow Beginner Guide on s6 Starter Pack]]