Open computator opened 1 month ago
I was looking into something else and came up with this command that has a similar idea to how I would have expected the tree
subcommand to work:
podman image list --all --format '{{.Repository}},{{.Tag}},{{.ID}},{{printf "%.12s" .ParentId}},{{.Created}},{{.Size}}' \
| column -s , --tree-id 3 --tree-parent 4 --tree 3 -N 'REPOSITORY,TAG,IMAGE ID,PARENT,CREATED,SIZE' -H PARENT
A subset of the output of this on my computer looks like this:
REPOSITORY TAG IMAGE ID CREATED SIZE
trimmed...
quay.io/fedora/fedora-coreos stable c78efe0a5f79 4 weeks ago 1.44 GB
<none> <none> ├─3b5c5033dab3 2 weeks ago 1.44 GB
<none> <none> │ └─729ebbbd116d 2 weeks ago 1.44 GB
<none> <none> ├─993218797d64 3 weeks ago 1.44 GB
<none> <none> │ ├─d36640817651 3 weeks ago 1.44 GB
<none> <none> │ └─4fb30dfc2c4f 3 weeks ago 1.44 GB
<none> <none> └─bb961bb35394 3 weeks ago 1.44 GB
<none> <none> ├─74fb969c6753 2 weeks ago 1.44 GB
<none> <none> │ └─429c6b888d2a 2 weeks ago 1.55 GB
<none> <none> │ └─858ffdc3763b 7 days ago 1.55 GB
localhost/fcos-zfs latest │ └─12e3478fa432 7 days ago 1.55 GB
trimmed...
I realize this is images, not layers, but it still shows the general idea.
A friendly reminder that this issue had no activity for 30 days.
Issue Description
podman image tree <image_id>
purports to list all the layers in an image and their hierarchy. One would expect that the ids printed by this would correspond to image or layer ids or digests, and thus appear inpodman image inspect <image_id>
orpodman image list --all
. Instead the "layer ids" it outputs seem to mostly only match graphdriver overlay directories.Steps to reproduce the issue
Steps to reproduce the issue
podman image pull docker.io/library/php
podman image tree docker.io/library/php
podman image list --all
or in any of the expected fields ofpodman image inspect docker.io/library/php
. They also are not inspectable withpodman inspect <layer_id>
.Describe the results you received
Upon running tree I get these IDs
Note that the root layer id,
32148f9f6c5a
, is the only one that appears in the output of the layers section ofpodman image inspect
(below). All of the rest, including the one claiming to be the top layer of the image only appear in theGraphDriver
section overlay directories. None of the layer ids appear inpodman image list --all
. In many images not even the root layer appears in the layers section ofinspect
.Describe the results you expected
I would expect all of the listed ids to correspond to one of the layer ids from this section of the
inspect
output:For more complicated images I may even expect some of the ids to match up with intermediate images seen in
podman image list --all
(I realize that may be a different layer type than the rootfs layers, I just mean that might be expected based on thetree
command description).podman info output
Podman in a container
Yes
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
I am testing this with the latest podman from
quay.io/podman/stable
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting