github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-images.1.md.in (about)

     1  % podman-images 1
     2  
     3  ## NAME
     4  podman\-images - List images in local storage
     5  
     6  ## SYNOPSIS
     7  **podman images** [*options*] [image]
     8  
     9  **podman image list** [*options*] [image]
    10  
    11  **podman image ls** [*options*] [image]
    12  
    13  ## DESCRIPTION
    14  Displays locally stored images, their names, and their IDs.
    15  
    16  ## OPTIONS
    17  
    18  #### **--all**, **-a**
    19  
    20  Show all images (by default filter out the intermediate image layers). The default is false.
    21  
    22  #### **--digests**
    23  
    24  Show image digests
    25  
    26  #### **--filter**, **-f**=*filter*
    27  
    28  Provide filter values.
    29  
    30  The *filters* argument format is of `key=value` or `key!=value`. If there is more than one *filter*, then pass multiple OPTIONS: **--filter** *foo=bar* **--filter** *bif=baz*.
    31  
    32  Supported filters:
    33  
    34  | Filter       | Description                                                                                   |
    35  |:------------:|-----------------------------------------------------------------------------------------------|
    36  | id           | Filter by image ID.                                                                           |
    37  | before       | Filter by images created before the given IMAGE (name or tag).                                |
    38  | containers   | Filter by images with a running container.                                                    |
    39  | dangling     | Filter by dangling (unused) images.                                                           |
    40  | digest       | Filter by digest.                                                                             |
    41  | intermediate | Filter by images that are dangling and have no children                                       |
    42  | label        | Filter by images with (or without, in the case of label!=[...] is used) the specified labels. |
    43  | manifest     | Filter by images that are manifest lists.                                                     |
    44  | readonly     | Filter by read-only or read/write images.                                                     |
    45  | reference    | Filter by image name.                                                                         |
    46  | after/since  | Filter by images created after the given IMAGE (name or tag).                                 |
    47  | until        | Filter by images created until the given duration or time.                                    |
    48  
    49  The `id` *filter* accepts the image ID string.
    50  
    51  The `before` *filter* accepts formats: `<image-name>[:<tag>]`, `<image id>` or `<image@digest>`.
    52  
    53  The `containers` *filter* shows images that have a running container based on that image.
    54  
    55  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.
    56  
    57  The `digest` *filter* accepts the image digest string.
    58  
    59  The `intermediate` *filter* shows images that are dangling and have no children.
    60  
    61  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.
    62  
    63  The `manifest` *filter* shows images that are manifest lists.
    64  
    65  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.
    66  
    67  The `reference` *filter* accepts the pattern of an image reference `<image-name>[:<tag>]`.
    68  
    69  The `after` or `since` *filter* accepts formats: `<image-name>[:<tag>]`, `<image id>` or `<image@digest>`.
    70  
    71  The `until` *filter* accepts formats: golang duration, RFC3339 time, or a Unix timestamp and shows all images that are created until that time.
    72  
    73  #### **--format**=*format*
    74  
    75  Change the default output format.  This can be of a supported type like 'json'
    76  or a Go template.
    77  Valid placeholders for the Go template are listed below:
    78  
    79  | **Placeholder** | **Description**                                            |
    80  |-----------------|------------------------------------------------------------|
    81  | .Containers     | Number of containers using this image                      |
    82  | .Created        | Elapsed time since the image was created                   |
    83  | .CreatedAt      | Time when the image was created, YYYY-MM-DD HH:MM:SS +nnnn |
    84  | .CreatedSince   | Same as .Created                                           |
    85  | .CreatedTime    | Same as .CreatedAt                                         |
    86  | .Dangling       | Same as .IsDangling                                        |
    87  | .Digest         | Image digest                                               |
    88  | .History        | History of the image layer                                 |
    89  | .ID             | Image ID (truncated)                                       |
    90  | .Id             | Image ID (full SHA)                                        |
    91  | .IsDangling     | Is image dangling? (true/false)                            |
    92  | .IsReadOnly     | Is unage read-only? (true/false)                           |
    93  | .Labels ...     | map[] of labels                                            |
    94  | .Names          | Image FQIN                                                 |
    95  | .ParentId       | Full SHA of parent image ID, or null (string)              |
    96  | .ReadOnly       | Same as .IsReadOnly                                        |
    97  | .RepoDigests    | map[] of zero or more repo/name@sha256:SHA strings         |
    98  | .Repository     | Image repository                                           |
    99  | .RepoTags       | map[] of zero or more FQIN strings for this image          |
   100  | .SharedSize     | Always seems to be 0                                       |
   101  | .Size           | Size of layer on disk (human-friendly string)              |
   102  | .Tag            | Image tag                                                  |
   103  | .VirtualSize    | Size of layer on disk (bytes)                              |
   104  
   105  #### **--history**
   106  
   107  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.
   108  
   109  #### **--no-trunc**
   110  
   111  Do not truncate the output (default *false*).
   112  
   113  @@option noheading
   114  
   115  #### **--quiet**, **-q**
   116  
   117  Lists only the image IDs.
   118  
   119  #### **--sort**=*sort*
   120  
   121  Sort by *created*, *id*, *repository*, *size* or *tag* (default: **created**)
   122  
   123  ## EXAMPLE
   124  
   125  List all non-dangling images in local storage:
   126  ```
   127  $ podman images
   128  REPOSITORY                         TAG         IMAGE ID      CREATED       SIZE
   129  quay.io/podman/stable              latest      e0b7dabc3352  22 hours ago  331 MB
   130  docker.io/library/alpine           latest      9c6f07244728  5 days ago    5.83 MB
   131  registry.fedoraproject.org/fedora  latest      2ecb6df95994  3 weeks ago   169 MB
   132  quay.io/libpod/testimage           20220615    f26aa69bb3f3  2 months ago  8.4 MB
   133  ```
   134  
   135  List all images matching the specified name:
   136  ```
   137  $ podman images stable
   138  REPOSITORY             TAG         IMAGE ID      CREATED       SIZE
   139  quay.io/podman/stable  latest      e0b7dabc3352  22 hours ago  331 MB
   140  ```
   141  
   142  List image ids of all images in containers storage:
   143  ```
   144  # podman image ls --quiet
   145  e3d42bcaf643
   146  ebb91b73692b
   147  4526339ae51c
   148  ```
   149  
   150  List all images without showing the headers:
   151  ```
   152  # podman images --noheading
   153  docker.io/kubernetes/pause                   latest   e3d42bcaf643   3 years ago   251 kB
   154  <none>                                       <none>   ebb91b73692b   4 weeks ago   27.2 MB
   155  docker.io/library/ubuntu                     latest   4526339ae51c   6 weeks ago   126 MB
   156  ```
   157  
   158  List all images without truncating output:
   159  ```
   160  # podman image list --no-trunc
   161  REPOSITORY                                   TAG      IMAGE ID                                                                  CREATED       SIZE
   162  docker.io/kubernetes/pause                   latest   sha256:e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27   3 years ago   251 kB
   163  <none>                                       <none>   sha256:ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9   4 weeks ago   27.2 MB
   164  docker.io/library/ubuntu                     latest   sha256:4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a   6 weeks ago   126 MB
   165  ```
   166  
   167  List all image content with the formatted content:
   168  ```
   169  # podman images --format "table {{.ID}} {{.Repository}} {{.Tag}}"
   170  IMAGE ID       REPOSITORY                                   TAG
   171  e3d42bcaf643   docker.io/kubernetes/pause                   latest
   172  ebb91b73692b   <none>                                       <none>
   173  4526339ae51c   docker.io/library/ubuntu                     latest
   174  ```
   175  
   176  List any image that is not tagged with a name (dangling):
   177  ```
   178  # podman images --filter dangling=true
   179  REPOSITORY   TAG      IMAGE ID       CREATED       SIZE
   180  <none>       <none>   ebb91b73692b   4 weeks ago   27.2 MB
   181  ```
   182  
   183  List all images in JSON format:
   184  ```
   185  # podman images --format json
   186  [
   187      {
   188  	"id": "e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27",
   189  	"names": [
   190  	    "docker.io/kubernetes/pause:latest"
   191  	],
   192  	"digest": "sha256:0aecf73ff86844324847883f2e916d3f6984c5fae3c2f23e91d66f549fe7d423",
   193  	"created": "2014-07-19T07:02:32.267701596Z",
   194  	"size": 250665
   195      },
   196      {
   197  	"id": "ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9",
   198  	"names": [
   199  	    "\u003cnone\u003e"
   200  	],
   201  	"digest": "sha256:ba7e4091d27e8114a205003ca6a768905c3395d961624a2c78873d9526461032",
   202  	"created": "2017-10-26T03:07:22.796184288Z",
   203  	"size": 27170520
   204      },
   205      {
   206  	"id": "4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a",
   207  	"names": [
   208  	    "docker.io/library/ubuntu:latest"
   209  	],
   210  	"digest": "sha256:193f7734ddd68e0fb24ba9af8c2b673aecb0227b026871f8e932dab45add7753",
   211  	"created": "2017-10-10T20:59:05.10196344Z",
   212  	"size": 126085200
   213      }
   214  ]
   215  ```
   216  
   217  List all images sorted by the specified column:
   218  ```
   219  # podman images --sort repository
   220  REPOSITORY                                   TAG      IMAGE ID       CREATED       SIZE
   221  <none>                                      <none>   2460217d76fc   About a minute ago   4.41 MB
   222  docker.io/library/alpine                    latest   3fd9065eaf02   5 months ago         4.41 MB
   223  localhost/myapp                             latest   b2e0ad03474a   About a minute ago   4.41 MB
   224  registry.access.redhat.com/rhel7            latest   7a840db7f020   2 weeks ago          211 MB
   225  registry.fedoraproject.org/fedora           27       801894bc0e43   6 weeks ago          246 MB
   226  ```
   227  
   228  Show the difference between listed images in use versus all images, including dangling images:
   229  ```
   230  # podman images
   231  REPOSITORY                 TAG      IMAGE ID       CREATED         SIZE
   232  localhost/test             latest   18f0c080cd72   4 seconds ago   4.42 MB
   233  docker.io/library/alpine   latest   3fd9065eaf02   5 months ago    4.41 MB
   234  # podman images -a
   235  REPOSITORY                 TAG      IMAGE ID       CREATED         SIZE
   236  localhost/test             latest   18f0c080cd72   6 seconds ago   4.42 MB
   237  <none>                     <none>   270e70dc54c0   7 seconds ago   4.42 MB
   238  <none>                     <none>   4ed6fbe43414   8 seconds ago   4.41 MB
   239  <none>                     <none>   6b0df8e71508   8 seconds ago   4.41 MB
   240  docker.io/library/alpine   latest   3fd9065eaf02   5 months ago    4.41 MB
   241  ```
   242  
   243  ## SEE ALSO
   244  **[podman(1)](podman.1.md)**, **[containers-storage.conf(5)](https://github.com/containers/storage/blob/main/docs/containers-storage.conf.5.md)**
   245  
   246  ## HISTORY
   247  March 2017, Originally compiled by Dan Walsh `<dwalsh@redhat.com>`