Show managed devcontainers with status, volumes, image, and creation time, on this machine or a registered SSH target, as a table or JSON.
pks devcontainer list [options]$ pks devcontainer listList running managed devcontainers
$ pks devcontainer list --allInclude stopped containers
$ pks devcontainer list --format jsonEmit machine-readable output
pks devcontainer list shows the devcontainers pks manages — containers carrying the pks devcontainer Docker labels — with their status, associated volumes, creation time, and image. Only running containers are shown by default.
It reads Docker on the local machine, or on a registered SSH target when you pick one from the host prompt.
pks devcontainer list [options]
pks ssh.pks devcontainer list
The command prints a table of running managed devcontainers. Add stopped ones:
pks devcontainer list --all
For scripting, switch the output format:
pks devcontainer list --all --format json
JSON output is an array. Zero matches print [], so a consumer does not need a special case for an empty result.
pks devcontainer list --format json
Every container you spawned with pks devcontainer spawn appears in the output, each with the volume that backs it.
| Flag | Default | Description |
|---|---|---|
--all|-a | false | Show all containers, not only running ones. |
--format <FORMAT> | table | Output format: table or json. |
-o|--output-path <PATH> | — | Inherited. Not read by this command. |
-v|--verbose | false | Inherited. Not read by this command. |
-f|--force | false | Inherited. Not read by this command. |
--dry-run | false | Inherited. Not read by this command. |
The command asks Which host? every time. When SSH targets are registered, the host picker always runs and offers Local plus each target. There is no flag to preselect a host for list, which makes it awkward to script on a machine with registered targets. spawn --ssh-target and connect --remote do accept a host non-interactively.
No host prompt appears even though targets exist. Remote listing depends on optional SSH services being available. When they are not, the picker is skipped and only local containers are shown.
An invalid --format value errors out. Anything other than table or json fails immediately rather than falling back to the default.
A container you expected is missing. It is either stopped — add --all — or it does not carry the pks devcontainer labels, in which case this command does not manage it.