AlphaMoatによると、2026-10時点でContainer Debugのダウンロード数は6,354、スター数は1で、累計ダウンロード数で今回のランキング対象AIスキル10,914件中4,498位、IT運用・セキュリティでは502件中152位です。
一覧の初期表示は累計ダウンロード数順で、スター数順にも並べ替えできます。詳細ページの順位は累計ダウンロード数で計算しています。
| プラットフォーム | ダウンロード数 | スター数 | コメント |
|---|---|---|---|
| ClawHub ↗ | 5588 | 1 | - |
| SkillHub ↗ | 6354 | 1 | — |
プラットフォームごとに集計方法と集計時点が異なります。
ログ、終了状態、ネットワーク、資源、ビルド段階、ヘルスチェックを扱い、Docker へのアクセスと必要なコンテナー内ツールが前提です。exec は稼働中のコンテナーが必要です。再起動、設定変更、削除はサービスやデータに影響するため、事前に確認します。
資料公開日 2026-10-27
スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。
2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。
| 月 | ダウンロード数 | 前月比 | スター数 |
|---|---|---|---|
| 2026-10 | 6354 | — | 1 |
| 2026-09 | 5435 | — | 1 |
| 2026-08 | 5268 | +5.2% | 1 |
| 2026-07 | 5008 | +5.2% | 1 |
| 2026-06 | 4759 | +3.9% | 1 |
| 2026-05 | 4581 | — | 1 |
| 2026-03 | 3893 | — | 1 |
作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。
---
name: container-debug
description: Debug running Docker containers and Compose services. Use when inspecting container logs, exec-ing into running containers, diagnosing networking issues, checking resource usage, debugging multi-stage builds, troubleshooting health checks, or fixing Compose service dependencies.
metadata: {"clawdbot":{"emoji":"🐳","requires":{"bins":["docker"]},"os":["linux","darwin","win32"]}}
---
# Container Debug
Debug running Docker containers and Compose services. Covers logs, exec, networking, resource inspection, multi-stage builds, health checks, and common failure patterns.
## When to Use
- Container exits immediately or crashes on start
- Application inside container behaves differently than on host
- Containers can't communicate with each other
- Container is using too much memory or CPU
- Multi-stage Docker build produces unexpected results
- Health checks are failing
- Compose services start in wrong order or can't connect
## Container Logs
### View and filter logs
```bash
# Last 100 lines
docker logs --tail 100 my-container
# Follow (stream) logs
docker logs -f my-container
# Follow with timestamps
docker logs -f -t my-container
# Logs since a time
docker logs --since 30m my-container
docker logs --since "2026-02-03T10:00:00" my-container
# Logs between times
docker logs --since 1h --until 30m my-container
# Compose: logs for all services
docker compose logs -f
# Compose: logs for specific service
docker compose logs -f api db
# Redirect logs to file for analysis
docker logs my-container > container.log 2>&1
# Separate stdout and stderr
docker logs my-container > stdout.log 2> stderr.log
```
### Inspect log driver
```bash
# Check what log driver a container uses
docker inspect --format='{{.HostConfig.LogConfig.Type}}' my-container
# If json-file driver, find the actual log file
docker inspect --format='{{.LogPath}}' my-container
# Check log file size
ls -lh $(docker inspect --format='{{.LogPath}}' my-container)
```
## Exec Into Containers
### Interactive shell
```bash
# Bash (most common)
docker exec -it my-container bash
# If bash isn't available (Alpine, distroless)
docker exec -it my-container sh
# As root (even if container runs as non-root user)
docker exec -u root -it my-container bash
# With specific environment variables
docker exec -e DEBUG=1 -it my-container bash
# Run a single command (no interactive shell)
docker exec my-container cat /etc/os-release
docker exec my-container ls -la /app/
docker exec my-container env
```
### Debug a crashed container
```bash
# Container exited? Check exit code
docker inspect --format='{{.State.ExitCode}}' my-container
docker inspect --format='{{.State.Error}}' my-container
# Common exit codes:
# 0 = clean exit
# 1 = application error
# 137 = killed (OOM or docker kill) — 128 + signal 9
# 139 = segfault — 128 + signal 11
# 143 = terminated (SIGTERM) — 128 + signal 15
# Start a stopped container to debug it
docker start -ai my-container
# Or override the entrypoint to get a shell
docker run -it --entrypoint sh my-image
# Copy files out of a stopped container
docker cp my-container:/app/error.log ./error.log
docker cp my-container:/etc/nginx/nginx.conf ./nginx.conf
```
### Debug without a shell (distroless / scratch images)
```bash
# Use docker cp to extract files
docker cp my-container:/app/config.json ./
# Use nsenter to get a shell in the container's namespace (Linux)
PID=$(docker inspect --format='{{.State.Pid}}' my-container)
nsenter -t $PID -m -u -i -n -p -- /bin/sh
# Attach a debug container to the same namespace
docker run -it --pid=container:my-container --net=container:my-container busybox sh
# Docker Desktop: use debug extension
docker debug my-container
```
## Networking
### Inspect container networking
```bash
# Show container IP address
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my-container
# Show all network details
docker inspect -f '{{json .NetworkSettings.Networks}}' my-container | jq
# List all networks
docker network ls
# Inspect a network (see all connected containers)
docker network inspect bridge
docker network inspect my-compose-network
# Show port mappings
docker port my-container
```
### Test connectivity between containers
```bash
# From inside container A, reach container B
docker exec container-a ping container-b
docker exec container-a curl http://container-b:8080/health
# DNS resolution inside container
docker exec my-container nslookup db
docker exec my-container cat /etc/resolv.conf
docker exec my-container cat /etc/hosts
# Test if port is reachable
docker exec my-container nc -zv db 5432
docker exec my-container wget -qO- http://api:3000/health
# If curl/ping not available in container, install or use a debug container:
docker run --rm --network container:my-container curlimages/curl curl -s http://localhost:8080
```
### Common networking issues
```bash
# "Connection refused" between containers
# 1. Check the app binds to 0.0.0.0, not 127.0.0.1
docker exec my-container netstat -tlnp
# If listening on 127.0.0.1 — fix the app config
# 2. Check containers are on the same network
docker inspect -f '{{json .NetworkSettings.Networks}}' container-a | jq 'keys'
docker inspect -f '{{json .NetworkSettings.Networks}}' container-b | jq 'keys'
# 3. Check published ports vs exposed ports
# EXPOSE only documents, it doesn't publish
# Use -p host:container to publish
# "Name not found" — DNS not resolving container names
# Container names resolve only on user-defined networks, NOT the default bridge
docker network create my-net
docker run --network my-net --name api my-api-image
docker run --network my-net --name db postgres
# Now "api" and "db" resolve to each other
```
### Capture network traffic
```bash
# tcpdump inside a container
docker exec my-container tcpdump -i eth0 -n port 8080
# If tcpdump not available, use a sidecar
docker run --rm --net=container:my-container nicolaka/netshoot tcpdump -i eth0 -n
# netshoot has: tcpdump, curl, nslookup, netstat, iperf, etc.
docker run --rm --net=container:my-container nicolaka/netshoot bash
```
## Resource Usage
### Real-time stats
```bash
# All containers
docker stats
# Specific containers
docker stats api db redis
# One-shot (no streaming)
docker stats --no-stream
# Formatted output
docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}"
```
### Memory investigation
```bash
# Check memory limit
docker inspect --format='{{.HostConfig.Memory}}' my-container
# 0 means unlimited
# Check if container was OOM-killed
docker inspect --format='{{.State.OOMKilled}}' my-container
# Memory usage breakdown (Linux cgroups)
docker exec my-container cat /sys/fs/cgroup/memory.current 2>/dev/null || \
docker exec my-container cat /sys/fs/cgroup/memory/memory.usage_in_bytes
# Process memory inside container
docker exec my-container ps aux --sort=-%mem | head -10
docker exec my-container top -bn1
```
### Disk usage
```bash
# Overall Docker disk usage
docker system df
docker system df -v
# Container filesystem size
docker inspect --format='{{.SizeRw}}' my-container
# Find large files inside container
docker exec my-container du -sh /* 2>/dev/null | sort -rh | head -10
docker exec my-container find /tmp -size +10M -type f
# Check for log file bloat
docker exec my-container ls -lh /var/log/
```
## Dockerfile Debugging
### Multi-stage build debugging
```bash
# Build up to a specific stage
docker build --target builder -t my-app:builder .
# Inspect what's in the builder stage
docker run --rm -it my-app:builder sh
docker run --rm my-app:builder ls -la /app/
docker run --rm my-app:builder cat /app/package.json
# Check which files made it to the final image
docker run --rm my-image ls -laR /app/
# Build with no cache (fresh build)
docker build --no-cache -t my-app .
# Build with progress output
docker build --progress=plain -t my-app .
```
### Image inspection
```bash
# Show image layers (size of each)
docker history my-image
docker history --no-trunc my-image
# Inspect image config (entrypoint, cmd, env, ports)
docker inspect my-image | jq '.[0].Config | {Cmd, Entrypoint, Env, ExposedPorts, WorkingDir}'
# Compare two images
docker history image-a --format "{{.Size}}\t{{.CreatedBy}}" > layers-a.txt
docker history image-b --format "{{.Size}}\t{{.CreatedBy}}" > layers-b.txt
diff layers-a.txt layers-b.txt
# Find what changed between builds
docker diff my-container
# A = added, C = changed, D = deleted
```
## Health Checks
### Define and debug health checks
```dockerfile
# In Dockerfile
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
```
```bash
# Check health status
docker inspect --format='{{.State.Health.Status}}' my-container
# "healthy", "unhealthy", or "starting"
# See health check log (last 5 results)
docker inspect --format='{{json .State.Health}}' my-container | jq
# Run health check manually
docker exec my-container curl -f http://localhost:8080/health
# Override health check at run time
docker run --health-cmd "curl -f http://localhost:8080/health || exit 1" \
--health-interval 10s my-image
# Disable health check
docker run --no-healthcheck my-image
```
## Docker Compose Debugging
### Service startup issues
```bash
# Check service status
docker compose ps
# See why a service failed
docker compose logs failed-service
# Start with verbose output
docker compose up --build 2>&1 | tee compose.log
# Start a single service (with dependencies)
docker compose up db
# Start without dependencies
docker compose up --no-deps api
# Recreate containers from scratch
docker compose up --force-recreate --build
# Check effective config (after variable substitution)
docker compose config
```
### Service dependency and startup order
```yaml
# docker-compose.yml
services:
api:
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
db:
image: postgres:16
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
```
```bash
# Wait for a service to be healthy before running commands
docker compose up -d db
docker compose exec db pg_isready # Polls until ready
docker compose up -d api
```
## Cleanup
```bash
# Remove stopped containers
docker container prune
# Remove unused images
docker image prune
# Remove everything unused (containers, images, networks, volumes)
docker system prune -a
# Remove volumes too (WARNING: deletes data)
docker system prune -a --volumes
# Remove dangling build cache
docker builder prune
```
## Tips
- `docker logs -f` is the first thing to check. Most container failures are visible in the logs.
- Exit code 137 means OOM-killed. Increase the memory limit or fix the memory leak.
- Apps inside containers must bind to `0.0.0.0`, not `127.0.0.1`. Localhost inside a container is isolated.
- Container names only resolve via DNS on user-defined networks, not the default `bridge`. Always create a custom network for multi-container setups.
- `docker exec` only works on running containers. For crashed containers, use `docker cp` to extract logs or override the entrypoint with `docker run --entrypoint sh`.
- `nicolaka/netshoot` is the Swiss Army knife for container networking. It has every networking tool pre-installed.
- `--progress=plain` during builds shows full command output, which is essential for debugging build failures.
- Health checks with `start-period` prevent false unhealthy status during slow application startup.
钟馗.Skill——会更新漏洞库的安全审查专家。直来直去、快刀斩乱麻,三层审查(静态审计/行为模拟/供应链溯源)覆盖12类风险,输出结构化安全裁定(✅干净/⚠️可疑/🚫恶意)。Use when 用户说"审查这个Skill"、"安全检查"、"钟馗看下"、"审一下"、"查一下这个skill"、安装Skill前的安全评估、或需要审计SKILL.md的恶意载荷。
使う前にスキルパッケージの安全性を調べ、結果に応じて導入を止めるスキルです。
OpenClaw に OpenRouter の無料モデルとフォールバック連鎖を設定するツールです。
Parse, search, and analyze application logs across formats. Use when debugging from log files, setting up structured logging, analyzing error patterns, correlating events across services, parsing stack traces, or monitoring log output in real time.
Security checks for installing skills, packages, or plugins. Use BEFORE any npm install, openclaw plugins install, clawhub install, or similar install...
网络安全与SRC漏洞掘金实战技能。融合「系统学习路径」与「SRC实战掘金」双模式: ①学习模式=法律→基础→工具→靶场→攻防→就业全流程; ②实战模式=直接指导在腾讯TSRC、阿里ASRC、百度BSRC等平台挖掘高价值漏洞变现。 当用户提出以下问题时触发: "我想学网络安全怎么入门""SRC漏洞怎么挖能赚钱""渗透测试需要学什么" "Web安全漏洞原理是什么""怎么准备CTF比赛""护网面试会问什么" "云安全怎么学""挖漏洞赚钱的方法""端口扫描脚本怎么写" "SQL注入怎么检测""子域名怎么枚举""XSS漏洞怎么找" "靶场怎么搭建""Kali Linux怎么用""Metasploit怎么入门" "等保测评是什么""代码审计怎么做""内网渗透怎么学" "信息泄露漏洞怎么挖""越权漏洞怎么测试""逻辑漏洞挖掘技巧" "简历怎么写才能进安全公司""安全行业面试题有哪些" "Burp Suite怎么用""DVWA怎么安装""Pikachu靶场搭建" "Vulhub漏洞复现""网络安全法有什么规定""CTF夺旗赛怎么参加" "AWD比赛是什么""应急响应怎么做""攻击溯源怎么搞" "数据安全怎么保障""公有云安全怎么防护""私有云攻防怎么做" "云原生安全是什么"。
Unified Web penetration testing and SRC vulnerability hunting Skill. Model-driven threat modeling (12 dimensions), JSON 字段规范 state persistence, SRC/补天 compliant reporting with confirmed gate (3-layer determination). Use when user asks for authorized penetration testing, vulnerability assessment, SRC hunting (补天/Butian/vendor SRC/CNVD/众测), bug bounty, security evaluation with explicit target URL, or wants operational Recon→PoC→Report workflow. Do NOT use for CTF challenges, unauthorized testing, mobile app testing, infrastructure scanning, or social engineering.
Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.
コマンドラインから SQL データベースの照会、設計、移行、最適化を行います。
git-workflows は履歴整理、デバッグ、リポジトリ管理の高度な Git 手順を提供します。
security-audit はコードとインフラの安全性を確認するチェックリストとコマンド例を提供します。
Test Patterns は複数の言語・フレームワークでのテスト作成と実行を案内します。
コマンドラインで HTTP API を組み立て、試し、文書化し、調べます。
データ月:2026-10 · ダウンロード数とスター数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。