Quick start
lens-containers
lens-containers --once
lens-containers --runtime docker --state running
lens-containers --jsonRun without flags for the interactive list. Select a container and press Enter to inspect runtime, id, name, image, status, normalized state, created time and published ports.
Reading container state
docker, podman, or nerdctl for the manager that reported the row.Up 2 hours or Exited (0) 3 days ago.running, exited, created, paused and similar.Presence and permissions
Collection is optional per runtime. If docker, podman, or nerdctl is not installed, or the daemon is not live, that runtime contributes no rows and no warning. If the tools are installed and live but the current user cannot access the socket or lacks the usual admin group, Lens records a clear collection_warnings entry and still returns any rows it can read.
Multiple runtimes may appear in one snapshot. Lens never merges rows across runtimes that share a name.
Interaction
Start, stop or restart a container
Select a container and press a. Choose start, stop or restart, review the exact runtime and target, then press y to execute. The same operations are available to scripts:
# Review a scriptable plan; no state change
lens-containers --action restart --name edge-mqtt --match exact --dry-run
# Execute after explicit non-interactive confirmation
lens-containers --action start --name metrics-agent --match exact --expect-status running --yesSelectors must resolve to exactly one container. The operation runs as the invoking user, has a 15-second deadline and is never retried automatically. After execution, --expect-status can wait for the desired state (default wait 2s).
Filters and output
--runtime RUNTIMERestrict to docker, podman, or nerdctl.--name NAMEMatch name or id; pair with --match exact for a unique target.--image IMAGEMatch the image reference.--status TEXTMatch the human status string.--state STATEMatch normalized state such as running or exited.--fail-if-emptyExit 3 when no rows match after filters.--plain / --json / --jsonlOne-shot formats for scripts; --fields containers projects JSON.If container data is incomplete
An empty list with no warning usually means no usable Docker/Podman/nerdctl runtime is installed or live for this user. An empty or partial list with a warning means the tools exist but access failed. Process-level container hints from cgroups remain available in lens-top.