krallin/tini logo

krallin/tini

Free

A tiny but valid `init` for containers

FreeFree tier
Type
Open Source

About krallin/tini

Tini is a minimal init system designed for use inside Docker containers. It spawns a single child process and waits for it to exit, while automatically reaping zombie processes and forwarding signals like SIGTERM to the child. This prevents PID exhaustion from zombie accumulation and ensures that default signal handlers work correctly without explicit configuration. Tini is transparent: existing Docker images work with Tini without modifications. It can be added as an entrypoint or enabled via Docker's --init flag (Docker 1.13+). The project provides signed binaries and checksum verification for security.

Key Features

Spawns a single child process and waits for it to exit
Automatically reaps zombie processes to prevent PID starvation
Forwards signals (e.g., SIGTERM) to the child process transparently
Works without any changes to existing Docker images
Can be used via Docker's built-in --init flag (Docker 1.13+)
Provides signed binaries and SHA1/SHA256 checksum verification

Pros & Cons

Pros
  • Protects containers from accidental zombie process accumulation
  • Ensures default signal handlers work without explicit configuration
  • Transparent and compatible with existing Docker images
  • Extremely small and simple – no complex init features
  • Included in Docker Engine (optional --init flag) for easy adoption
  • Open source with signed releases and checksum verification
Cons
  • Only supports a single child process; not suitable for multi-service containers
  • Primarily designed for container environments, not general init replacement
  • Requires manual addition to Docker image if Docker version < 1.13 or custom setup

Best For

Running containerized applications that need proper signal handling (e.g., SIGTERM termination)Preventing PID exhaustion from zombie processes in long-running containersServing as a lightweight init for any Docker container entrypoint

FAQ

What is Tini?
Tini is a minimal init system for containers. It spawns a child process, waits for it to exit, reaps zombie processes, and forwards signals.
How do I use Tini with Docker?
You can add Tini to your Docker image as the entrypoint (ENTRYPOINT ['/tini', '--']) or use Docker's built-in --init flag (Docker 1.13+).
Does Tini work with any base image?
Yes, Tini is compatible with any Docker image. It is transparent and requires no changes to your existing software.
Is Tini secure?
Tini provides signed binaries (GPG key 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7) and SHA1/SHA256 checksums for verification.