App crashes with `Error: listen EADDRINUSE: address already in use :::3000` inside the container.
BeginnerTroubleshootingContainers that exit, crash or misbehave
Answer
Likely causes → Two processes in the container on the same port (e.g. nodemon plus a second start), or a restarted process before the old one released the port.
Diagnose → docker exec c ss -tlnp (or netstat), docker top c.
Fix → Run a single process, fix the dev script, use --init to reap.
Prevent → One process per container.
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