Expand description
Parse and validate the opt-in init process for docker isolation (issue #244):
--init run `docker run --init`, so Docker's bundled tini is PID 1
and reaps orphaned processes
--no-init keep the command as PID 1, overriding the environment defaultWithout either flag, START_COMMAND_DOCKER_INIT=1 turns it on for every
docker launch on the host. The default stays off: a command that is its
own supervisor keeps today’s behaviour, and recovery works the same for
containers started with or without it.
Constants§
- DOCKER_
INIT_ ENV - Environment variable holding the host-wide default.
Functions§
- docker_
init_ from_ env_ value - Whether an environment value asks for an init process (1, true, yes, on).
- parse
- Parse
--init/--no-init. Returns the number of arguments consumed. - validate
- Resolve
options.initfrom the environment. Seevalidate_with_env. - validate_
with_ env - Resolve
options.inittoSome(bool): the flag if one was given (Nonemeans none), otherwise the environment default for docker launches. Idempotent, because validation may run again on options it already resolved:--no-init(or a resolvedfalse) without docker is the default anyway and is accepted.