github.com/nf/docker@v1.8.1/docs/reference/commandline/images.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "images"
     4  description = "The images command description and usage"
     5  keywords = ["list, docker, images"]
     6  [menu.main]
     7  parent = "smn_cli"
     8  weight=1
     9  +++
    10  <![end-metadata]-->
    11  
    12  # images
    13  
    14      Usage: docker images [OPTIONS] [REPOSITORY]
    15  
    16      List images
    17  
    18        -a, --all=false      Show all images (default hides intermediate images)
    19        --digests=false      Show digests
    20        -f, --filter=[]      Filter output based on conditions provided
    21        --help=false         Print usage
    22        --no-trunc=false     Don't truncate output
    23        -q, --quiet=false    Only show numeric IDs
    24  
    25  The default `docker images` will show all top level
    26  images, their repository and tags, and their virtual size.
    27  
    28  Docker images have intermediate layers that increase reusability,
    29  decrease disk usage, and speed up `docker build` by
    30  allowing each step to be cached. These intermediate layers are not shown
    31  by default.
    32  
    33  The `VIRTUAL SIZE` is the cumulative space taken up by the image and all
    34  its parent images. This is also the disk space used by the contents of the
    35  Tar file created when you `docker save` an image.
    36  
    37  An image will be listed more than once if it has multiple repository names
    38  or tags. This single image (identifiable by its matching `IMAGE ID`)
    39  uses up the `VIRTUAL SIZE` listed only once.
    40  
    41  ### Listing the most recently created images
    42  
    43      $ docker images
    44      REPOSITORY                TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
    45      <none>                    <none>              77af4d6b9913        19 hours ago        1.089 GB
    46      committ                   latest              b6fa739cedf5        19 hours ago        1.089 GB
    47      <none>                    <none>              78a85c484f71        19 hours ago        1.089 GB
    48      docker                    latest              30557a29d5ab        20 hours ago        1.089 GB
    49      <none>                    <none>              5ed6274db6ce        24 hours ago        1.089 GB
    50      postgres                  9                   746b819f315e        4 days ago          213.4 MB
    51      postgres                  9.3                 746b819f315e        4 days ago          213.4 MB
    52      postgres                  9.3.5               746b819f315e        4 days ago          213.4 MB
    53      postgres                  latest              746b819f315e        4 days ago          213.4 MB
    54  
    55  
    56  ## Listing the full length image IDs
    57  
    58      $ docker images --no-trunc
    59      REPOSITORY                    TAG                 IMAGE ID                                                           CREATED             VIRTUAL SIZE
    60      <none>                        <none>              77af4d6b9913e693e8d0b4b294fa62ade6054e6b2f1ffb617ac955dd63fb0182   19 hours ago        1.089 GB
    61      committest                    latest              b6fa739cedf5ea12a620a439402b6004d057da800f91c7524b5086a5e4749c9f   19 hours ago        1.089 GB
    62      <none>                        <none>              78a85c484f71509adeaace20e72e941f6bdd2b25b4c75da8693efd9f61a37921   19 hours ago        1.089 GB
    63      docker                        latest              30557a29d5abc51e5f1d5b472e79b7e296f595abcf19fe6b9199dbbc809c6ff4   20 hours ago        1.089 GB
    64      <none>                        <none>              0124422dd9f9cf7ef15c0617cda3931ee68346455441d66ab8bdc5b05e9fdce5   20 hours ago        1.089 GB
    65      <none>                        <none>              18ad6fad340262ac2a636efd98a6d1f0ea775ae3d45240d3418466495a19a81b   22 hours ago        1.082 GB
    66      <none>                        <none>              f9f1e26352f0a3ba6a0ff68167559f64f3e21ff7ada60366e2d44a04befd1d3a   23 hours ago        1.089 GB
    67      tryout                        latest              2629d1fa0b81b222fca63371ca16cbf6a0772d07759ff80e8d1369b926940074   23 hours ago        131.5 MB
    68      <none>                        <none>              5ed6274db6ceb2397844896966ea239290555e74ef307030ebb01ff91b1914df   24 hours ago        1.089 GB
    69  
    70  ## Listing image digests
    71  
    72  Images that use the v2 or later format have a content-addressable identifier
    73  called a `digest`. As long as the input used to generate the image is
    74  unchanged, the digest value is predictable. To list image digest values, use
    75  the `--digests` flag:
    76  
    77      $ docker images --digests
    78      REPOSITORY                         TAG                 DIGEST                                                                    IMAGE ID            CREATED             VIRTUAL SIZE
    79      localhost:5000/test/busybox        <none>              sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf   4986bf8c1536        9 weeks ago         2.43 MB
    80  
    81  When pushing or pulling to a 2.0 registry, the `push` or `pull` command
    82  output includes the image digest. You can `pull` using a digest value. You can
    83  also reference by digest in `create`, `run`, and `rmi` commands, as well as the
    84  `FROM` image reference in a Dockerfile.
    85  
    86  ## Filtering
    87  
    88  The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
    89  than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
    90  
    91  The currently supported filters are:
    92  
    93  * dangling (boolean - true or false)
    94  * label (`label=<key>` or `label=<key>=<value>`)
    95  
    96  ##### Untagged images
    97  
    98      $ docker images --filter "dangling=true"
    99  
   100      REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
   101      <none>              <none>              8abc22fbb042        4 weeks ago         0 B
   102      <none>              <none>              48e5f45168b9        4 weeks ago         2.489 MB
   103      <none>              <none>              bf747efa0e2f        4 weeks ago         0 B
   104      <none>              <none>              980fe10e5736        12 weeks ago        101.4 MB
   105      <none>              <none>              dea752e4e117        12 weeks ago        101.4 MB
   106      <none>              <none>              511136ea3c5a        8 months ago        0 B
   107  
   108  This will display untagged images, that are the leaves of the images tree (not
   109  intermediary layers). These images occur when a new build of an image takes the
   110  `repo:tag` away from the image ID, leaving it untagged. A warning will be issued
   111  if trying to remove an image when a container is presently using it.
   112  By having this flag it allows for batch cleanup.
   113  
   114  Ready for use by `docker rmi ...`, like:
   115  
   116      $ docker rmi $(docker images -f "dangling=true" -q)
   117  
   118      8abc22fbb042
   119      48e5f45168b9
   120      bf747efa0e2f
   121      980fe10e5736
   122      dea752e4e117
   123      511136ea3c5a
   124  
   125  NOTE: Docker will warn you if any containers exist that are using these untagged images.
   126  
   127