Skip to content

FAQ

Is init the same as systemd?

On modern Linux systems, systemd replaces init as PID 1 but plays the same role. The traditional SysV init is still present in some distributions and embedded systems. In containers, init is whatever runs as PID 1 inside the container's namespace, often tini, dumb-init, or a purpose-built entrypoint.

Do I need an init process in every container?

Only if the container's main process has children. A single-process container that does not fork does not need an explicit init. A container that forks children needs an init to reap zombies and forward signals. When in doubt, adding tini costs almost nothing and prevents a class of hard-to-debug failures.

What is `git init` doing?

git init creates a .git directory with the repository skeleton: config, HEAD, refs, objects, hooks. Without that directory, Git does not recognize the folder as a repository and refuses to track anything. It is the minimal operation that turns a folder into a repository.

Should init do migrations?

Usually no. Migrations in init turn every restart into a migration attempt, which is expensive, fragile, and hard to reason about. Migrations belong in a dedicated migration job or a pre-deploy step, not in the hot path of every container start.

Why does my container exit immediately on start?

The most common cause is init that exits: either the entrypoint finished with no long-running process, or the entrypoint failed and the container's restart policy was "no". Check the container logs, check the exit code, and confirm that the entrypoint stays in the foreground. Init must keep the process alive; if it exits, the container exits.