Claude-skill-registry docker-management
Docker container and image management including logs, stats, and compose operations. Use when managing Docker containers, debugging container issues, or working with Docker Compose.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/docker-management" ~/.claude/skills/majiayu000-claude-skill-registry-docker-management && rm -rf "$T"
manifest:
skills/data/docker-management/SKILL.mdsource content
Docker Management Skill
Version: 1.0.0 Purpose: Docker container and compose management
Triggers
| Trigger | Examples |
|---|---|
| Containers | "list containers", "docker ps", "コンテナ一覧" |
| Logs | "container logs", "docker logs", "ログ確認" |
| Debug | "debug container", "container issue", "デバッグ" |
| Compose | "compose up", "compose status", "Compose起動" |
Integrated MCP Tools
Container Operations
| Tool | Purpose |
|---|---|
| List containers (running/all) |
| List local images |
| Container logs (tail, follow) |
| Container details (JSON) |
| Resource usage (CPU, memory) |
| Execute command in container |
| Start stopped container |
| Stop running container |
| Restart container |
| Remove container |
Compose Operations
| Tool | Purpose |
|---|---|
| Compose project status |
| Service logs |
| Start services |
| Stop and remove services |
Workflow: Container Debugging
Phase 1: Assessment
Step 1.1: List Containers
Use docker_ps with: - all: true (include stopped)
Step 1.2: Check Status
Look for:
- Exit codes
- Restart counts
- Health status
Phase 2: Investigation
Step 2.1: View Logs
Use docker_logs with: - container: Container name/ID - tail: 100 (last N lines) - timestamps: true
Step 2.2: Inspect Configuration
Use docker_inspect to check: - Environment variables - Mount points - Network settings - Health check config
Step 2.3: Resource Usage
Use docker_stats to monitor: - CPU percentage - Memory usage - Network I/O - Block I/O
Phase 3: Resolution
Step 3.1: Restart Container
Use docker_restart for temporary fix
Step 3.2: Execute Commands
Use docker_exec to run diagnostics inside container: - command: "sh -c 'ps aux'" - command: "cat /var/log/app.log"
Workflow: Docker Compose
Step 1: Check Status
Use compose_ps to see all services
Step 2: View Logs
Use compose_logs with: - service: Specific service name - tail: 50
Step 3: Service Management
Use compose_up to start services Use compose_down to stop and clean up
Common Issues
| Symptom | Tool | Action |
|---|---|---|
| Container exits | docker_logs | Check error messages |
| High memory | docker_stats | Identify memory leak |
| Network issues | docker_inspect | Verify network config |
| Mount failures | docker_inspect | Check volume mounts |
Best Practices
✅ GOOD:
- Check logs before restarting
- Use health checks
- Set resource limits
- Use named volumes
❌ BAD:
- Restart without investigation
- Run as root unnecessarily
- Store secrets in images
- Use latest tag in production
Checklist
- Docker daemon running
- Container status checked
- Logs reviewed
- Resource usage normal
- Network connectivity OK