Skip to content

Make consistent lists exit for commands 'podman container list -a' and 'podman images' #26641

Description

@aeiris

Feature request description

I suggest add the command 'podman containers' to list all containers, same exit of 'podman container list -a' but also modifying the schema (filters?) of the list to make it more compact as in 'podman images' exit.

This would intuitively pair with the 'podman images' to list images.

The list filters/schema could be:
CONTAINER ID | NAME | IMAGE | CREATED | STATUS or SIZE

Now fields are:
CONTAINER ID | IMAGE | COMMAND | CREATED | STATUS | PORTS | NAMES

Example:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
09cc4b895ba5 localhost/fedora-toolbox-base-41:latest toolbox --log-lev... 6 months ago Exited (143) 3 months ago fedora-toolbox
f8c4156d3e71 localhost/fedora-node-41:latest toolbox --log-lev... 6 months ago Exited (143) 5 months ago fedora-node
577c4b1801c4 localhost/fedora-toolbox-41:latest toolbox --log-lev... 5 months ago Exited (143) 4 months ago rust
927fafd83159 registry.fedoraproject.org/fedora-toolbox:41 toolbox --log-lev... 3 months ago Exited (143) 3 months ago mumble

For podman images is:
REPOSITORY | TAG | IMAGE ID |CREATED | SIZE

Example:
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/fedora-node-base-41 latest 8ad1ce78440e 6 months ago 4.03 GB
localhost/fedora-toolbox-41 latest 9e19679632c7 6 months ago 5.62 GB
registry.fedoraproject.org/fedora-toolbox 41 53cbabee2cf6 6 months ago 2.21 GB

I noted also that 'podman images' output is more compact.

Related issue about podman container list filters: #21398
#21398

Suggest potential solution

I propose:

  • add 'podman containers' command

  • using a field schema for its output like:
    CONTAINER ID | NAME | IMAGE | CREATED | STATUS (and/or SIZE)

not showing COMMAND and PORTS fields
changing fields order NAMES

  • make more compact the output format

Have you considered any alternatives?

Can be created an alias and custom schemas, but would be better having this command out-of-the-box

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.stale-issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions