Container Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=2896
Answer
Container troubleshooting checks the container's state and logs, its image and configuration, resources, mounts and network, and the host's runtime.
Remember
Start with docker ps -a and docker logs. Exit codes, OOMKilled and restart counts tell a lot. Test from inside the container to separate app from network problems.
First checks
docker ps -a / podman ps -a— containers and statedocker logs <c>— container outputdocker inspect <c>— configuration, mounts, networkdocker info— engine, storage driver, cgroup version
Commands
podman inspect <container>- Operational command for Inspect container runtime state. Focus fields: State.Status, ExitCode, Error, Pid, mounts, netw…
docker inspectdocker killdocker stats --no-stream webdocker inspect web --format '{{json .NetworkSettings.Networks}}'docker port webdocker inspect web --format '{{json .Mounts}}'docker exec -it web shdocker top webjournalctl -u docker --since -15mindocker system dfdocker logs
Verify in this order
state → logs → configuration → inside test → host resources
Where it usually breaks
First mismatch in hardware/kernel capability → scheduler/mm/device → cgroup/namespace → process/thread → service/runtime → workload behavior/counters; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2896