Debugging & Troubleshooting in Docker
From the Docker cheat sheet ยท System & Cleanup ยท verified Jul 2026
Debugging & Troubleshooting
Debug containers and resolve common Docker issues
bash
# Debug running container
docker logs container_name
docker logs -f --tail 50 container_name
docker exec -it container_name sh
# Inspect details
docker inspect container_name
docker inspect image_name
# Debug build
docker build --no-cache --progress=plain .
# Check processes
docker top container_name
# File changes
docker diff container_name๐ก nicolaka/netshoot has many network tools
๐ Use --progress=plain for detailed build output
๐ Override entrypoint to debug failed containers
โ
Always check logs first when debugging