github.com/flavio/docker@v0.1.3-0.20170117145210-f63d1a6eec47/man/src/image/ls.md (about)

     1  This command lists the images stored in the local Docker repository.
     2  
     3  By default, intermediate images, used during builds, are not listed. Some of the
     4  output, e.g., image ID, is truncated, for space reasons. However the truncated
     5  image ID, and often the first few characters, are enough to be used in other
     6  Docker commands that use the image ID. The output includes repository, tag, image
     7  ID, date created and the virtual size.
     8  
     9  The title REPOSITORY for the first title may seem confusing. It is essentially
    10  the image name. However, because you can tag a specific image, and multiple tags
    11  (image instances) can be associated with a single name, the name is really a
    12  repository for all tagged images of the same name. For example consider an image
    13  called fedora. It may be tagged with 18, 19, or 20, etc. to manage different
    14  versions.
    15  
    16  ## Filters
    17  
    18  Filters the output based on these conditions:
    19  
    20     - dangling=(true|false) - find unused images
    21     - label=<key> or label=<key>=<value>
    22     - before=(<image-name>[:tag]|<image-id>|<image@digest>)
    23     - since=(<image-name>[:tag]|<image-id>|<image@digest>)
    24  
    25  ## Format
    26  
    27     Pretty-print images using a Go template.
    28     Valid placeholders:
    29        .ID - Image ID
    30        .Repository - Image repository
    31        .Tag - Image tag
    32        .Digest - Image digest
    33        .CreatedSince - Elapsed time since the image was created
    34        .CreatedAt - Time when the image was created
    35        .Size - Image disk size
    36  
    37  # EXAMPLES
    38  
    39  ## Listing the images
    40  
    41  To list the images in a local repository (not the registry) run:
    42  
    43      docker image ls
    44  
    45  The list will contain the image repository name, a tag for the image, and an
    46  image ID, when it was created and its virtual size. Columns: REPOSITORY, TAG,
    47  IMAGE ID, CREATED, and SIZE.
    48  
    49  The `docker image ls` command takes an optional `[REPOSITORY[:TAG]]` argument
    50  that restricts the list to images that match the argument. If you specify
    51  `REPOSITORY`but no `TAG`, the `docker image ls` command lists all images in the
    52  given repository.
    53  
    54      docker image ls java
    55  
    56  The `[REPOSITORY[:TAG]]` value must be an "exact match". This means that, for example,
    57  `docker image ls jav` does not match the image `java`.
    58  
    59  If both `REPOSITORY` and `TAG` are provided, only images matching that
    60  repository and tag are listed.  To find all local images in the "java"
    61  repository with tag "8" you can use:
    62  
    63      docker image ls java:8
    64  
    65  To get a verbose list of images which contains all the intermediate images
    66  used in builds use **-a**:
    67  
    68      docker image ls -a
    69  
    70  Previously, the docker image ls command supported the --tree and --dot arguments,
    71  which displayed different visualizations of the image data. Docker core removed
    72  this functionality in the 1.7 version. If you liked this functionality, you can
    73  still find it in the third-party dockviz tool: https://github.com/justone/dockviz.
    74  
    75  ## Listing images in a desired format
    76  
    77  When using the --format option, the image command will either output the data 
    78  exactly as the template declares or, when using the `table` directive, will 
    79  include column headers as well. You can use special characters like `\t` for
    80  inserting tab spacing between columns. 
    81  
    82  The following example uses a template without headers and outputs the ID and 
    83  Repository entries separated by a colon for all images:
    84  
    85      docker images --format "{{.ID}}: {{.Repository}}"
    86      77af4d6b9913: <none>
    87      b6fa739cedf5: committ
    88      78a85c484bad: ipbabble
    89      30557a29d5ab: docker
    90      5ed6274db6ce: <none>
    91      746b819f315e: postgres
    92      746b819f315e: postgres
    93      746b819f315e: postgres
    94      746b819f315e: postgres
    95  
    96  To list all images with their repository and tag in a table format you can use:
    97  
    98      docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}"
    99      IMAGE ID            REPOSITORY                TAG
   100      77af4d6b9913        <none>                    <none>
   101      b6fa739cedf5        committ                   latest
   102      78a85c484bad        ipbabble                  <none>
   103      30557a29d5ab        docker                    latest
   104      5ed6274db6ce        <none>                    <none>
   105      746b819f315e        postgres                  9
   106      746b819f315e        postgres                  9.3
   107      746b819f315e        postgres                  9.3.5
   108      746b819f315e        postgres                  latest
   109  
   110  Valid template placeholders are listed above.
   111  
   112  ## Listing only the shortened image IDs
   113  
   114  Listing just the shortened image IDs. This can be useful for some automated
   115  tools.
   116  
   117      docker image ls -q