Tiny Linux distro (Alpine) + Tiny init (tini) to make sure child processes are correctly reaped
10K+
Dockerfile linksJust Alpine Linux, Tini and entrypoint using tini
Alpine Linux is a Linux distribution built around musl libc and BusyBox. The image is only 5 MB in size and has access to a package repository that is much more complete than other BusyBox based images. This makes Alpine Linux a great image base for utilities and even production applications. Read more about Alpine Linux here and you can see how their mantra fits in right at home with Docker images.
tini is a super small (~40KB), but valid init designed to be used inside containers.
init in my containerWhen you start a process in a docker container it runs with PID 1. Process with PID 1 is special: it's the process that "adopts" any orphaned child processes to reap them if parent process terminates (or is terminated) without waiting for its' child processes to exit.
What happens where there is no process to adopt and reap orphaned child processes? Container becomes UNKILLABLE - you can't stop it, restart it - you have to restart whole server to get rid of the zombie.
See: https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/
This image is intended as a base for other images:
FROM pygmy/alpine-tini:latest
// my changes
ENTRYPOINT ["/usr/bin/tini", "--"]
Content type
Image
Digest
Size
2.1 MB
Last updated
almost 8 years ago
docker pull pygmy/alpine-tini