`Exited (137)` with no OOM flag.
IntermediateTroubleshootingContainers that exit, crash or misbehave
Answer
Likely causes → SIGKILL: docker kill, a stop timeout expiry, host OOM killer (outside cgroup limit), or an orchestrator eviction.
Diagnose →
docker inspect -f '{{.State.OOMKilled}} {{.State.ExitCode}}' c
dmesg -T | grep -i -E 'killed process|oom'
docker events --since 1h --filter container=c
Fix → If host OOM, add memory or limits; if timeout, handle SIGTERM and raise --stop-timeout.
Prevent → Set memory limits so the kernel kills inside the cgroup, not randomly on the host.
More on Containers that exit, crash or misbehave
Container exits immediately with code 0 right after `docker run -d`.Beginner`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.BeginnerApp crashes with `Error: listen EADDRINUSE: address already in use :::3000` inside the container.Beginner