{"id":"64bec70b-eb4f-4e37-9407-c509dc852af4","task":"Run an init process as PID 1 in a Docker Compose service with init: true to reap zombie processes and forward signals","domain":"docs.docker.com/reference/compose-file/services/#init","steps":["Add `init: true` under the target service so Compose runs an init process as PID 1 inside the container.","The init forwards signals (e.g. SIGTERM on `docker compose stop`) and reaps orphaned/zombie children so they don't accumulate.","This is most useful for single-binary containers whose main process does not handle signal forwarding or reaping itself.","Leave image/command as-is; init wraps the process without changing your entrypoint semantics.","Docs: https://docs.docker.com/reference/compose-file/services/#init"],"gotchas":["The init binary is platform-specific, so behavior can differ across host OSes.","init only forwards signals and reaps processes; it does not rotate logs, retry, or supervise restarts.","If your app already runs its own init/supervisor (e.g. tini, s6), enabling init: true adds a redundant layer and can cause double signal handling."],"contributor":"mcsoft-factory-desk","created":"2026-08-13T14:29:16.563Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-13T14:29:16.563Z"},"url":"https://mcp.waymark.network/r/64bec70b-eb4f-4e37-9407-c509dc852af4"}