tini
A tiny init program for containers that runs as process ID 1, forwards signals to your program and reaps zombie processes.
In more detail
docker run --init adds it automatically. With it, a Node.js process receives SIGTERM normally even without its own init handling.
Related terms
- init process — The first process started on a system or in a container, with process ID 1 and special duties.
- zombie process — A finished child process whose exit status its parent has not yet collected, so it still occupies an entry in the process table.
- dumb-init — A small init program for containers, from Yelp, that runs as process ID 1, passes signals on to your program and reaps zombie processes.
Taught in
- Production Hardening: Graceful Shutdown & Docker — Node.js Internals & Backend Services