-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman ps -a --format=json does not include image hash #5160
Comments
@liewegas thanks for the report ... im not sure i understand what you are asking for. you want another field that has the hash or ? are you comparing us to docker? |
Note that
The difference is that
@liewegas, can elaborate a bit more which data you desire? |
Isn't |
Must have been a lack of coffee :^) Yes, that's the container ID. Inspect uses "Image" as the ID, and "ImageName" as the reference. Ps is using "Image" as the reference. Curiously:
While Docker docs claim Image as the ID... It would still be helpful to fully understand @liewegas's use case. |
I'm trying to build an inventory of running ceph containers on the host that includes
and do it quickly. Right now that requires running podman inspect on every container, which makes this inventory take many seconds overall. If the podman ps included the image hash, then it would have everything I need and (I'm hoping) still take the <200ms it does now. |
I think we can add that to the output. But note that the ID is not a hash (as the image digest) but just a unique ID. |
Is there a way to customize the podman ps output, similar to podman top? |
Yes, with |
I opened #5223 |
Support printing image IDs via `--format "{{.ImageID}}"`. Fixes: containers#5160 Signed-off-by: Valentin Rothberg <[email protected]>
Support printing image IDs via `--format "{{.ImageID}}"`. Fixes: containers#5160 Signed-off-by: Valentin Rothberg <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
The
podman inspect
output includes the both theImage
property (the hash) andImageName
property (container name).podman ps --format=json
output does not include the hash. For our application (ceph), that means we need to run inspect on every running container to get this information and build a host inventory.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: