Dumb-Init

1.2.5.post1 · active · verified Wed Apr 15

Dumb-init is a minimal init system for Linux containers, designed to run as PID 1. It acts as a simple process supervisor, properly handling signals sent to the container and reaping orphaned zombie processes, which is crucial for the graceful shutdown of applications and preventing resource leaks. The current version is 1.2.5.post1, and it maintains a steady, albeit infrequent, release cadence with minor updates and bug fixes.

Warnings

Install

Quickstart

This Dockerfile demonstrates how to install and use `dumb-init` as the entrypoint for a Python application. `dumb-init` will become PID 1, properly forwarding signals to `my_app.py` and reaping any zombie processes. Ensure your `CMD` also uses JSON array syntax.

FROM python:3.9-slim-buster

# Install dumb-init
RUN pip install dumb-init

WORKDIR /app
COPY my_app.py .

# Use dumb-init as the ENTRYPOINT
# Must use JSON array syntax to ensure dumb-init is PID 1
ENTRYPOINT ["dumb-init", "--"]

# Your actual application command
CMD ["python", "my_app.py"]

view raw JSON →