Interview Prep/Docker/Containers that exit, crash or misbehave

`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.

All Docker questions Roadmap: Docker & containers

More on Containers that exit, crash or misbehave