github.com/yogeshlonkar/moby@v1.13.2-0.20201203103638-c0b64beaea94/man/docker-images.1.md (about) 1 % DOCKER(1) Docker User Manuals 2 % Docker Community 3 % JUNE 2014 4 # NAME 5 docker-images - List images 6 7 # SYNOPSIS 8 **docker images** 9 [**--help**] 10 [**-a**|**--all**] 11 [**--digests**] 12 [**-f**|**--filter**[=*[]*]] 13 [**--format**=*"TEMPLATE"*] 14 [**--no-trunc**] 15 [**-q**|**--quiet**] 16 [REPOSITORY[:TAG]] 17 18 # DESCRIPTION 19 This command lists the images stored in the local Docker repository. 20 21 By default, intermediate images, used during builds, are not listed. Some of the 22 output, e.g., image ID, is truncated, for space reasons. However the truncated 23 image ID, and often the first few characters, are enough to be used in other 24 Docker commands that use the image ID. The output includes repository, tag, image 25 ID, date created and the virtual size. 26 27 The title REPOSITORY for the first title may seem confusing. It is essentially 28 the image name. However, because you can tag a specific image, and multiple tags 29 (image instances) can be associated with a single name, the name is really a 30 repository for all tagged images of the same name. For example consider an image 31 called fedora. It may be tagged with 18, 19, or 20, etc. to manage different 32 versions. 33 34 # OPTIONS 35 **-a**, **--all**=*true*|*false* 36 Show all images (by default filter out the intermediate image layers). The default is *false*. 37 38 **--digests**=*true*|*false* 39 Show image digests. The default is *false*. 40 41 **-f**, **--filter**=[] 42 Filters the output based on these conditions: 43 - dangling=(true|false) - find unused images 44 - label=<key> or label=<key>=<value> 45 - before=(<image-name>[:tag]|<image-id>|<image@digest>) 46 - since=(<image-name>[:tag]|<image-id>|<image@digest>) 47 - reference=(pattern of an image reference) 48 49 **--format**="*TEMPLATE*" 50 Pretty-print images using a Go template. 51 Valid placeholders: 52 .ID - Image ID 53 .Repository - Image repository 54 .Tag - Image tag 55 .Digest - Image digest 56 .CreatedSince - Elapsed time since the image was created 57 .CreatedAt - Time when the image was created 58 .Size - Image disk size 59 60 **--help** 61 Print usage statement 62 63 **--no-trunc**=*true*|*false* 64 Don't truncate output. The default is *false*. 65 66 **-q**, **--quiet**=*true*|*false* 67 Only show numeric IDs. The default is *false*. 68 69 # EXAMPLES 70 71 ## Listing the images 72 73 To list the images in a local repository (not the registry) run: 74 75 docker images 76 77 The list will contain the image repository name, a tag for the image, and an 78 image ID, when it was created and its virtual size. Columns: REPOSITORY, TAG, 79 IMAGE ID, CREATED, and SIZE. 80 81 The `docker images` command takes an optional `[REPOSITORY[:TAG]]` argument 82 that restricts the list to images that match the argument. If you specify 83 `REPOSITORY`but no `TAG`, the `docker images` command lists all images in the 84 given repository. 85 86 docker images java 87 88 The `[REPOSITORY[:TAG]]` value must be an "exact match". This means that, for example, 89 `docker images jav` does not match the image `java`. 90 91 If both `REPOSITORY` and `TAG` are provided, only images matching that 92 repository and tag are listed. To find all local images in the "java" 93 repository with tag "8" you can use: 94 95 docker images java:8 96 97 To get a verbose list of images which contains all the intermediate images 98 used in builds use **-a**: 99 100 docker images -a 101 102 Previously, the docker images command supported the --tree and --dot arguments, 103 which displayed different visualizations of the image data. Docker core removed 104 this functionality in the 1.7 version. If you liked this functionality, you can 105 still find it in the third-party dockviz tool: https://github.com/justone/dockviz. 106 107 ## Listing images in a desired format 108 109 When using the --format option, the image command will either output the data 110 exactly as the template declares or, when using the `table` directive, will 111 include column headers as well. You can use special characters like `\t` for 112 inserting tab spacing between columns. 113 114 The following example uses a template without headers and outputs the ID and 115 Repository entries separated by a colon for all images: 116 117 docker images --format "{{.ID}}: {{.Repository}}" 118 77af4d6b9913: <none> 119 b6fa739cedf5: committ 120 78a85c484bad: ipbabble 121 30557a29d5ab: docker 122 5ed6274db6ce: <none> 123 746b819f315e: postgres 124 746b819f315e: postgres 125 746b819f315e: postgres 126 746b819f315e: postgres 127 128 To list all images with their repository and tag in a table format you can use: 129 130 docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}" 131 IMAGE ID REPOSITORY TAG 132 77af4d6b9913 <none> <none> 133 b6fa739cedf5 committ latest 134 78a85c484bad ipbabble <none> 135 30557a29d5ab docker latest 136 5ed6274db6ce <none> <none> 137 746b819f315e postgres 9 138 746b819f315e postgres 9.3 139 746b819f315e postgres 9.3.5 140 746b819f315e postgres latest 141 142 Valid template placeholders are listed above. 143 144 ## Listing only the shortened image IDs 145 146 Listing just the shortened image IDs. This can be useful for some automated 147 tools. 148 149 docker images -q 150 151 # HISTORY 152 April 2014, Originally compiled by William Henry (whenry at redhat dot com) 153 based on docker.com source material and internal work. 154 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>