After `docker stop` a container takes exactly 10 seconds every time.
BeginnerTroubleshootingContainers that exit, crash or misbehave
Answer
Likely causes → Process ignores SIGTERM (shell form entrypoint, PID 1 without handler).
Diagnose → docker inspect -f '{{.Config.Entrypoint}} {{.Config.Cmd}}' c; docker exec c ps.
Fix → Exec form, exec "$@" in scripts, --init, or docker stop -t.
Prevent → Measure stop time in smoke tests.
More on Containers that exit, crash or misbehave
Container exits immediately with code 0 right after `docker run -d`.Beginner`Exited (137)` with no OOM flag.Intermediate`Exited (139)` segmentation fault.Advanced`Exited (126)` / `Exited (127)`.Beginner`exec /entrypoint.sh: exec format error`Intermediate`docker run` says `WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8)` and the app is very slow.Beginner