| name | container-debugging |
| description | Debug Docker containers and containerized applications. Diagnose deployment issues, container lifecycle problems, and resource constraints.
|
Container Debugging
Table of Contents
Overview
Container debugging focuses on issues within Docker/Kubernetes environments including resource constraints, networking, and application runtime problems.
When to Use
- Container won't start
- Application crashes in container
- Resource limits exceeded
- Network connectivity issues
- Performance problems in containers
Quick Start
Minimal working example:
docker ps -a
docker inspect <container-id>
docker stats <container-id>
docker logs <container-id>
docker logs --follow <container-id>
docker logs --tail 100 <container-id>
docker exec -it <container-id> /bin/bash
docker exec -it <container-id> sh
docker inspect <container-id> | grep -A 5 "State"
docker inspect <container-id> | grep -E "Memory|Cpu"
docker top <container-id>
docker stats <container-id>
// ... (see reference guides for full implementation)
Reference Guides
Detailed implementations in the references/ directory:
Best Practices
✅ DO
- Follow established patterns and conventions
- Write clean, maintainable code
- Add appropriate documentation
- Test thoroughly before deploying
❌ DON'T
- Skip testing or validation
- Ignore error handling
- Hard-code configuration values