Sign inSign up

pygmy/alpine-tini

By pygmy

Updated almost 8 years ago

Tiny Linux distro (Alpine) + Tiny init (tini) to make sure child processes are correctly reaped

Image
4

10K+

pygmy/alpine-tini repository overview

What's in this image?

Just Alpine Linux, Tini and entrypoint using tini

What is Alpine Linux?

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.

What is tini

tini is a super small (~40KB), but valid init designed to be used inside containers.

Why do I want init in my container

When 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/

How to use this image

This image is intended as a base for other images:

FROM pygmy/alpine-tini:latest

// my changes

ENTRYPOINT ["/usr/bin/tini", "--"]

Tag summary

Content type

Image

Digest

Size

2.1 MB

Last updated

almost 8 years ago

docker pull pygmy/alpine-tini