podman-images(1)

πŸ’… podman-images(1) πŸ’…

okay so real talk, this is the General Commands Manual page for podman-images, and it is fully going to teach you how to peek at the images chilling in your local storage. no cap, it's a good one. sit down, hydrate, let's go 🫢


✨ NAME ✨

podman-images β€” List images in local storage

basically: what images do i even have on this machine. iconic question. slay. πŸŽ€


🌸 SYNOPSIS 🌸

three whole ways to say the exact same thing, bestie β€” pick your fave:

podman images [options] [image]

podman image list [options] [image]

podman image ls [options] [image]

πŸ’œ DESCRIPTION πŸ’œ

it displays the images you've got stored locally, their names, and their IDs. literally that's it, that's the whole vibe check. locally stored images + names + IDs ✨


πŸ”₯ OPTIONS πŸ”₯

πŸ’« --all, -a

shows all the images. by default it filters out the intermediate image layers, which, rude but okay. the default is false. 🫠

πŸŽ€ --digests

shows image digests. yes queen, show the digests.

πŸ¦‹ --filter, -f=filter

this is the big one, so pay attention bestie. it provides filter values.

if you've got more than one filter, you gotta pass the --filter option multiple times, like this:

--filter label=test --filter until=10m

supported filters, alphabet-ish order, no detail dropped:

  • id β€” filter by image ID
  • before β€” filter by images created before the given IMAGE (name or tag)
  • containers β€” filter by images with a running container
  • dangling β€” filter by dangling (unused) images
  • digest β€” filter by digest
  • intermediate β€” filter by images that are dangling and have no children
  • label β€” filter by images with (or without, in the case of label!=[...] is used) the specified labels
  • manifest β€” filter by images that are manifest lists
  • readonly β€” filter by read-only or read/write images
  • reference β€” filter by image name
  • after/since β€” filter by images created after the given IMAGE (name or tag)
  • until β€” filter by images created until the given duration or time

and now the full tea on each one, in the order the manpage spills it:

  • the id filter accepts the image ID string.
  • the before filter accepts formats: <image-name>[:<tag>], <image id> or <image@digest>.
  • the containers filter shows images that have a running container based on that image.
  • the dangling filter shows images that are taking up disk space and serve no purpose. dangling image is a file system layer that was used in a previous build of an image and is no longer referenced by any image. they are denoted with the <none> tag, consume disk space and serve no active purpose. 😭 (not them eating your disk for zero reason)
  • the digest filter accepts the image digest string.
  • the intermediate filter shows images that are dangling and have no children.
  • the label filter accepts two formats. one is the label=key or label=key=value, which shows images with the specified labels. the other format is the label!=key or label!=key=value, which shows images without the specified labels.
  • the readonly filter accepts true or false.
  • the reference filter accepts regex expressions like image:.*-alpine.
  • the after/since filter accepts formats: <image-name>[:<tag>], <image id> or <image@digest>.
  • the until filter shows images created before the given date/time. the <timestamp> can be Unix timestamps, date formatted timestamps (e.g. 2020-12-31, 2021-01-01T10:00:00), or Go duration strings (e.g. 10m, 1h30m).

and bc this manpage really said "again" 🫠 here's the second pass β€” same filters, a couple of extra deets, zero words dropped:

  • the label filter accepts two formats. one is the label=key or label=key=value, which shows images with the specified labels. the other format is the label!=key or label!=key=value, which shows images without the specified labels.
  • the manifest filter shows images that are manifest lists.
  • the readonly filter shows, as a default, both read-only and read/write images. read-only images can be configured by modifying the additionalimagestores in the /etc/containers/storage.conf file. πŸ“
  • the reference filter accepts the pattern of an image reference <image-name>[:<tag>].
  • the after or since filter accepts formats: <image-name>[:<tag>], <image id> or <image@digest>.
  • the until filter accepts formats: golang duration, RFC3339 time, or a Unix timestamp and shows all images that are created until that time.
okay so yes, some of these show up twice in the original page β€” i'm not deleting them, i'm not merging them, we keep the whole thing fr fr πŸ”₯

⭐ --format=format

change the default output format. this can be of a supported type like 'json' or a Go template. valid placeholders for the Go template are listed below:


okay so the --format placeholder menu is basically the image gossip glossary, and every single one matters:

  • .Containers β€” number of containers using this image. periodt.
  • .Created β€” elapsed time since the image was created.
  • .CreatedAt β€” exact time the image was created, formatted as YYYY-MM-DD HH:MM:SS +nnnn.
  • .CreatedSince β€” same as .Created.
  • .CreatedTime β€” same as .CreatedAt.
  • .Dangling β€” same as .IsDangling.
  • .Digest β€” the image digest.
  • .History β€” history of the image layer.
  • .ID β€” image ID, but truncated.
  • .Id β€” image ID, full SHA.
  • .IsDangling β€” is the image dangling? (true/false).
  • .IsReadOnly β€” is unage read-only? (true/false) πŸ™ˆ yes, spelling and all, we don't make the rules.
  • .Labels ... β€” map[] of labels.
  • .Names β€” image FQIN.
  • .ParentId β€” full SHA of parent image ID, or null (string).
  • .ReadOnly β€” same as .IsReadOnly.
  • .RepoDigests β€” map[] of zero or more repo/name@sha256:SHA strings.
  • .Repository β€” image repository.
  • .RepoTags β€” map[] of zero or more FQIN strings for this image.
  • .SharedSize β€” always seems to be 0. iconic.
  • .Size β€” size of layer on disk (human-friendly string).
  • .Tag β€” image tag.
  • .VirtualSize β€” size of layer on disk (bytes).

  • --history β€” display the history of image names. if an image gets re-tagged or untagged, then the image name history gets prepended (latest image first). this is especially useful when undoing a tag operation or an image does not contain any name because it has been untagged. lowkey a lifesaver for tag chaos πŸŽ€
  • --no-trunc β€” do not truncate the output (default false).
  • --noheading, -n β€” omit the table headings from the listing.
  • --quiet, -q β€” lists only the image IDs.
  • --sort=sort β€” sort by created, id, repository, size or tag (default: created). when sorting by repository it also sorts by the tag as second criteria to provide a stable output. stable output is the vibe fr fr ✨

🌈 EXAMPLES 🌈

Okay bestie, this is the fun part β€” real commands, real output, real main-character energy. Let’s go πŸ’…

List all non-dangling images in local storage β€” the classic β€œwhat do I even have in here?” move:

$ podman images
REPOSITORY                         TAG         IMAGE ID      CREATED       SIZE
quay.io/podman/stable              latest      e0b7dabc3352  22 hours ago  331 MB
docker.io/library/alpine           latest      9c6f07244728  5 days ago    5.83 MB
registry.fedoraproject.org/fedora  latest      2ecb6df95994  3 weeks ago   169 MB
quay.io/libpod/testimage           20220615    f26aa69bb3f3  2 months ago  8.4 MB

List all images matching the specified name β€” filter by name, slay:

$ podman images stable
REPOSITORY             TAG         IMAGE ID      CREATED       SIZE
quay.io/podman/stable  latest      e0b7dabc3352  22 hours ago  331 MB

List image ids of all images in containers storage β€” just the IDs, no extra commentary:

# podman image ls --quiet
e3d42bcaf643
ebb91b73692b
4526339ae51c

List all images without showing the headers β€” headers? Don’t know her:

# podman images --noheading
docker.io/kubernetes/pause                   latest   e3d42bcaf643   3 years ago   251 kB
<none>                                       <none>   ebb91b73692b   4 weeks ago   27.2 MB
docker.io/library/ubuntu                     latest   4526339ae51c   6 weeks ago   126 MB

List all images without truncating output β€” full IDs, no shortening, no cap:

# podman image list --no-trunc
REPOSITORY                                   TAG      IMAGE ID                                                                  CREATED       SIZE
docker.io/kubernetes/pause                   latest   sha256:e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27   3 years ago   251 kB
<none>                                       <none>   sha256:ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9   4 weeks ago   27.2 MB
docker.io/library/ubuntu                     latest   sha256:4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a   6 weeks ago   126 MB

List all image content with the formatted content β€” table format, but make it your own:

# podman images --format "table {{.ID}} {{.Repository}} {{.Tag}}"
IMAGE ID       REPOSITORY                                   TAG
e3d42bcaf643   docker.io/kubernetes/pause                   latest
ebb91b73692b   <none>                                       <none>
4526339ae51c   docker.io/library/ubuntu                     latest

List any image that is not tagged with a name (dangling) β€” dangling images get a spotlight too:

# podman images --filter dangling=true
REPOSITORY   TAG      IMAGE ID       CREATED       SIZE
<none>       <none>   ebb91b73692b   4 weeks ago   27.2 MB

List all images in JSON format β€” for when you want your image data looking like a whole API moment:

# podman images --format json
[
    {
     "id": "e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27",
     "names": [
         "docker.io/kubernetes/pause:latest"
     ],
     "digest": "sha256:0aecf73ff86844324847883f2e916d3f6984c5fae3c2f23e91d66f549fe7d423",
     "created": "2014-07-19T07:02:32.267701596Z",
     "size": 250665
    },
    {
     "id": "ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9",
     "names": [
         "\u003cnone\u003e"
     ],
     "digest": "sha256:ba7e4091d27e8114a205003ca6a768905c3395d961624a2c78873d9526461032",
     "created": "2017-10-26T03:07:22.796184288Z",
     "size": 27170520
    },
    {
     "id": "4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a",
     "names": [
         "docker.io/library/ubuntu:latest"
     ],
     "digest": "sha256:193f7734ddd68e0fb24ba9af8c2b673aecb0227b026871f8e932dab45add7753",
     "created": "2017-10-10T20:59:05.10196344Z",
     "size": 126085200
    }
]

List all images sorted by the specified column β€” organize the chaos, periodt:

# podman images --sort repository
REPOSITORY                                   TAG      IMAGE ID       CREATED       SIZE
<none>                                      <none>   2460217d76fc   About a minute ago   4.41 MB
docker.io/library/alpine                    latest   3fd9065eaf02   5 months ago         4.41 MB
localhost/myapp                             latest   b2e0ad03474a   About a minute ago   4.41 MB
registry.access.redhat.com/rhel7            latest   7a840db7f020   2 weeks ago          211 MB
registry.fedoraproject.org/fedora           27       801894bc0e43   6 weeks ago          246 MB

Show the difference between listed images in use versus all images, including dangling images β€” this is the β€œwait, where did those extra images come from?” moment:

# podman images
REPOSITORY                 TAG      IMAGE ID       CREATED         SIZE
localhost/test             latest   18f0c080cd72   4 seconds ago   4.42 MB
docker.io/library/alpine   latest   3fd9065eaf02   5 months ago    4.41 MB
# podman images -a
REPOSITORY                 TAG      IMAGE ID       CREATED         SIZE
localhost/test             latest   18f0c080cd72   6 seconds ago   4.42 MB
<none>                     <none>   270e70dc54c0   7 seconds ago   4.42 MB
<none>                     <none>   4ed6fbe43414   8 seconds ago   4.41 MB
<none>                     <none>   6b0df8e71508   8 seconds ago   4.41 MB
docker.io/library/alpine   latest   3fd9065eaf02   5 months ago    4.41 MB

🌸 SEE ALSO 🌸

πŸ› οΈ Troubleshooting πŸ› οΈ

See podman-troubleshooting(7) for solutions to common issues.

πŸ‘‘ HISTORY πŸ‘‘

March 2017, Originally compiled by Dan Walsh <dwalsh@redhat.com>.


πŸ’– And that’s a wrap on podman-images(1), bestie β€” source, version, and date are doing their cute little footer thing, and we’re out. Bye! πŸ’…βœ¨

πŸ“¦ where this page comes from