Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

nerdctl

$ nerdctl Foundation Med Risk
containerd / CNCF · Cloud & Infra · Apache-2.0 · macos / linux / windows

nerdctl is a Docker-compatible CLI for containerd, supporting rootless containers, BuildKit builds, lazy pulling (Stargz/Nydus), and Compose stacks. Listing and inspection commands (ps, images, inspect) support --format json and Go templates.

FCRS-1.0 Score
82 /100
Good
Medium Confidence
Zero-Friction Install
brew install nerdctl
CLI vs MCP Decision CLI Only

nerdctl communicates directly with local containerd sockets and BuildKit; direct CLI invocation with --format json is standard.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Supports --format json and Go-template field selection across ps, images, and inspect, though it lacks a global --dry-run flag.

  • nerdctl ps --format json and nerdctl inspect output structured JSON
  • Docker-compatible flags for non-interactive execution
Trust & Safety 19 / 25

Supports rootless containerd execution and --namespace isolation, though destructive commands (rm, prune) lack --dry-run.

  • Supports rootless mode and containerd --namespace isolation
  • No global --dry-run on compose or system prune
Setup & Portability 12 / 15

Native on Linux containerd; on macOS and Windows it runs via a Linux VM such as Lima or Rancher Desktop.

  • Linux-native containerd client; macOS uses Lima VM wrapper
Utility & Efficiency 13 / 15

Drop-in Docker UX directly over containerd, including k8s.io namespace debugging and nerdctl compose.

  • Inspects Kubernetes k8s.io containerd containers without Docker daemon
Maintenance & Lineage 9 / 10

Official CNCF containerd/nerdctl subproject licensed under Apache-2.0.

  • Maintained under CNCF containerd/nerdctl
Docs & Verifiability 8 / 10

Well-documented feature guides and command reference in containerd/nerdctl/docs.

  • Upstream docs at github.com/containerd/nerdctl/tree/main/docs

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Reads OCI registry credentials from ~/.docker/config.json and talks to the containerd socket (CONTAINERD_ADDRESS).

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

Open-source CNCF project (Apache-2.0) and completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# nerdctl Agent Rules
- Specify `--namespace <ns>` (e.g., `k8s.io` vs `default`) when inspecting containerd workloads.
- Prefer `--format json` on `ps`/`images`/`inspect` and pass `--rm` for ephemeral `nerdctl run` checks.
- Never run `nerdctl system prune -a --volumes` without explicit approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

List containerd containers in JSON
nerdctl ps -a --format json

Emits JSON lines with container ID, image, status, and ports from the active containerd namespace.

Inspect an image or container configuration
nerdctl inspect alpine:latest --format '{{json .}}'

Outputs full containerd/OCI object metadata as JSON.

Controlled Writes & Previews

Run a disposable command in an isolated container
nerdctl run --rm --platform linux/amd64 alpine:latest uname -m

Executes a single command with --rm auto-cleanup and pinned --platform.

Strengths for Agents

  • + Docker-compatible CLI flags plus --format json directly on top of containerd.
  • + Supports --namespace k8s.io for inspecting Kubernetes node containers directly.
  • + Supports rootless mode, BuildKit builds, and nerdctl compose.

Caveats & Pitfalls

  • ! Non-Linux hosts (macOS/Windows) require a Linux VM (Lima, Colima, or Rancher Desktop).
  • ! Lacks a global --dry-run flag on compose or system prune.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI