Guidance for debugging and troubleshooting Docker issues. Covers container startup failures (exit codes, docker logs, inspect), disk space exhaustion (system df/prune, log rotation), OOM and resource pressure (memory limits, stats), network connectivity problems (network inspect, iptables, DNS resolution), storage issues (permission denied, volume inspection), daemon problems (dockerd startup, socket permissions), and common error diagnosis. Use when the user asks about docker troubleshooting, …
Guidance for debugging and troubleshooting Docker issues.
Covers container startup failures (exit codes, docker logs, inspect), disk space exhaustion (system df/prune, log rotation), OOM and resource pressure (memory limits, stats), network connectivity problems (network inspect, iptables, DNS resolution), storage issues (permission denied, volume inspection), daemon problems (dockerd startup, socket permissions), and common error diagnosis.
Use when the user asks about docker troubleshooting, docker debug, OOM, disk full, network issues, docker not starting, container crash, or needs to investigate Docker problems. 使用场景:docker 排查、docker debug、容器问题、OOM、磁盘满、网络不通、启动失败、?
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
docker system prune is destructive: Removes ALL unused objects. Don't run blindly in production. → Recovery: Use docker system df first to preview; add --filter "until=24h" for safe cleanup; never run prune -a without confirmation.
Logs fill disk silently: JSON-file driver has NO rotation by default. A noisy app can fill the disk in hours. → Recovery: docker run --log-opt max-size=10m --log-opt max-file=3 app; existing: truncate -s 0 $(docker inspect -f '{{.LogPath}}' myapp).
OOMKilled=TRUE but no error in logs: SIGKILL can't be logged. → Recovery: Check docker inspect -f '{{.State.OOMKilled}}' myapp; increase memory: docker update --memory 512m myapp.
Exited (0) but service not working: Application started but crashed after health check passed. → Recovery: docker logs --tail 100 myapp; check if app listens on 0.0.0.0 (not 127.0.0.1); verify with docker exec myapp netstat -tlnp.
Boundary — 能力边界(适用与不适用场景)
分类
场景
说明
✅ 能做
容器启动失败排查
退出码分析 + docker logs + inspect
✅ 能做
磁盘/日志/资源问题
docker system df + prune + log rotation
✅ 能做
OOM/CPU 排查
docker stats + --memory 限制 + OOMKilled
⚠️ 需条件
网络包级分析
需 tcpdump/Wireshark + 网络知识
⚠️ 需条件
内核级问题
需 Linux 内核调试技能
❌ 超范围
应用代码 bug 修复
开发者修复代码
❌ 超范围
生产环境部署
使用 docker-production
❌ 超范围
安全漏洞修复
使用 docker-security + docker-scout
When NOT to Use This Skill
❌ Skip
✅ Use Instead
Setting up production
docker-production
Security issues
docker-security
Performance tuning
docker-run (resource limits)
Docker basics
docker-basics
Security & Stability
docker exec into production containers can expose sensitive data. Prefer log-based debugging.
docker system prune -a removes ALL unused images and volumes — use with caution in production.
Inspecting containers with --privileged debug tools can bypass security controls.
Never expose Docker socket (/var/run/docker.sock) to containers for debugging — it grants root access.
Rotate debug logs — they may contain sensitive information. Use log drivers with TTL.