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-04 Sun wk31 16:46] – [s6 Service Driectories] baumkpdocker_notes:init [2024-10-13 Sun wk41 12:34] (current) – [References] baumkp
Line 62: Line 62:
 ====s6 commands==== ====s6 commands====
 ++++Basic S6 commands:| ++++Basic S6 commands:|
- 
   *''s6-svstat /run/service/servicename'' or ''s6-svstat /run/s6-rc/servicedirs/deluged'' - check a daemon status, longrun only!   *''s6-svstat /run/service/servicename'' or ''s6-svstat /run/s6-rc/servicedirs/deluged'' - check a daemon status, longrun only!
   *''s6-rc -u change servicename'' - enable and start a daemon (up)   *''s6-rc -u change servicename'' - enable and start a daemon (up)
Line 75: Line 74:
 ++++ ++++
  
 +=====docker builtin basic init=====
 +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://github.com/docker-library/official-images?tab=readme-ov-file#init|docker library #init]]
 +  *[[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]]