nerdctl
$ nerdctl Foundation Med Risknerdctl 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.
brew install nerdctl nerdctl communicates directly with local containerd sockets and BuildKit; direct CLI invocation with --format json is standard.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --format json and Go-template field selection across ps, images, and inspect, though it lacks a global --dry-run flag.
nerdctl ps --format jsonandnerdctl inspectoutput structured JSON- Docker-compatible flags for non-interactive execution
Supports rootless containerd execution and --namespace isolation, though destructive commands (rm, prune) lack --dry-run.
- Supports rootless mode and containerd
--namespaceisolation - No global
--dry-runoncomposeorsystem prune
Native on Linux containerd; on macOS and Windows it runs via a Linux VM such as Lima or Rancher Desktop.
- Linux-native
containerdclient; macOS uses Lima VM wrapper
Drop-in Docker UX directly over containerd, including k8s.io namespace debugging and nerdctl compose.
- Inspects Kubernetes
k8s.iocontainerd containers without Docker daemon
Official CNCF containerd/nerdctl subproject licensed under Apache-2.0.
- Maintained under CNCF
containerd/nerdctl
Well-documented feature guides and command reference in containerd/nerdctl/docs.
- Upstream docs at github.com/containerd/nerdctl/tree/main/docs
Security, Auth & Guardrails
Reads OCI registry credentials from ~/.docker/config.json and talks to the containerd socket (CONTAINERD_ADDRESS).
Open-source CNCF project (Apache-2.0) and completely free.
# 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
nerdctl ps -a --format json
Emits JSON lines with container ID, image, status, and ports from the active containerd namespace.
nerdctl inspect alpine:latest --format '{{json .}}' Outputs full containerd/OCI object metadata as JSON.
Controlled Writes & Previews
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 jsondirectly on top ofcontainerd. - + Supports
--namespace k8s.iofor 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-runflag oncomposeorsystem prune.