AGENT SKILL

docker-debug-containers

Debug Docker container failures using inspect, logs, exec, resource checks, and targeted remediation steps

License 许可
MIT
最近更新
2026-03-30
Stars
★ 2
Forks
0

01 前言 Front Matter

name
docker-debug-containers
description
Debug Docker container failures using inspect, logs, exec, resource checks, and targeted remediation steps

03 SKILL.md 正文

Docker Debug Containers

Use this skill when containers fail to start, restart repeatedly, or behave unexpectedly.

1. Capture Container State

Start with high-signal status output:

docker ps -a --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}'

Then inspect the target container:

docker inspect <container>

Extract:

  • exit code,
  • restart count/policy,
  • health status,
  • mounted volumes,
  • network attachment.

2. Read Logs with Scope

Get recent logs:

docker logs --tail 200 <container>

If the issue is timing-sensitive, follow logs:

docker logs -f <container>

Capture the first actionable error lines instead of dumping unfiltered output.

3. Run In-Container Checks

Use exec for runtime validation:

docker exec -it <container> sh

Check process health, config files, env values, connectivity, and required binaries.

4. Check Host and Resource Signals

Use non-streaming stats for quick pressure checks:

docker stats --no-stream

Investigate network/volume dependencies as needed:

docker network inspect <network>
docker volume inspect <volume>

5. Provide Remediation Path

Offer targeted next actions based on observed evidence:

  • config/env fixes,
  • image rebuilds,
  • dependency service startup ordering,
  • restart policy adjustments,
  • container recreate (docker rm + docker run/docker compose up) when safe and requested.

6. Return a Debug Report

Return:

  • symptom summary,
  • root-cause hypothesis,
  • evidence (commands + key outputs),
  • specific remediation steps,
  • validation command to confirm fix.

04 同仓库更多 Skills

NagyVikt
NagyVikt/codex-plugins

workflow

Vercel Workflow DevKit (WDK) expert guidance. Use when building durable workflows, long-running tasks, API routes or agents that need pause/resume, retries, step-based execution, or crash-safe orchestration with Vercel Workflow.

★ 2
NagyVikt
NagyVikt/codex-plugins

verification

Full-story verification — infers what the user is building, then verifies the complete flow end-to-end: browser → API → data → response. Triggers on dev server start and 'why isn't this working' signals.

★ 2
NagyVikt
NagyVikt/codex-plugins

vercel-storage

Vercel storage expert guidance — Blob, Edge Config, and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.

★ 2
NagyVikt
NagyVikt/codex-plugins

vercel-services

Vercel Services — deploy multiple services within a single Vercel project. Use for monorepo layouts or when combining a backend (Python, Go) with a frontend (Next.js, Vite) in one deployment.

★ 2
NagyVikt
NagyVikt/codex-plugins

vercel-sandbox

Vercel Sandbox guidance — ephemeral Firecracker microVMs for running untrusted code safely. Supports AI agents, code generation, and experimentation. Use when executing user-generated or AI-generated code in isolation.

★ 2
NagyVikt
NagyVikt/codex-plugins

vercel-queues

Vercel Queues guidance (public beta) — durable event streaming with topics, consumer groups, retries, and delayed delivery. $0.60/1M ops. Powers Workflow DevKit. Use when building async processing, fan-out patterns, or event-driven architectures.

★ 2