$ echo $?
Why did my container die?
Paste the evidence: an exit code, docker inspect or kubectl describeoutput, the kernel log, the tail of an strace, or /proc/PID/limits. Mixed is fine. It runs in your browser and nothing you paste gets sent anywhere.
or try:
137 is not a synonym for OOM
137 is 128 + 9: something sent SIGKILL. The OOM killer is one sender. So is docker stop when the grace period runs out. I ran both. A Python process in a 32 MiB container came back ExitCode=137 OOMKilled=true. A plainsleep as PID 1, stopped with docker stop -t 3, came backExitCode=137 OOMKilled=false after three seconds of ignoring SIGTERM. The samesleep under --init exited 143 in 0.2 seconds.
What to collect before you restart it
docker inspect -f 'ExitCode={{.State.ExitCode}} OOMKilled={{.State.OOMKilled}}' NAME
journalctl -k --since -1h | grep -iE 'oom|killed process'
cat /proc/PID/limits # while it is still aliveThe long versions: exit codes, errno,signals and resource limits. This is pattern matching on evidence. It narrows the search; it does not replace reading the log.