`Exited (139)` segmentation fault.
AdvancedTroubleshootingContainers that exit, crash or misbehave
Answer
Likely causes → Binary built for different libc (glibc vs musl) or CPU features, native module crash, emulated amd64 on arm64 running a JIT, or a genuine app bug.
Diagnose →
docker run --rm --entrypoint sh image -c 'uname -m; ldd /app/bin'
docker run --platform linux/amd64 ...
dmesg | grep segfault
Fix → Match base and architecture, rebuild native modules, enable core dumps (--ulimit core=-1) and analyze with gdb.
Prevent → Test images on the real target architecture.
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 (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