1DOCKER(1)                          JUNE 2014                         DOCKER(1)
2
3
4

NAME

6       docker-images - List images
7
8
9

SYNOPSIS

11       docker images [--help] [-a|--all] [--digests] [-f|--filter[=[]]]
12       [--format="TEMPLATE"] [--no-trunc] [-q|--quiet] [REPOSITORY[:TAG]]
13
14
15

DESCRIPTION

17       This command lists the images stored in the local Docker repository.
18
19
20       By default, intermediate images, used during builds, are not listed.
21       Some of the output, e.g., image ID, is truncated, for space reasons.
22       However the truncated image ID, and often the first few characters, are
23       enough to be used in other Docker commands that use the image ID. The
24       output includes repository, tag, image ID, date created and the virtual
25       size.
26
27
28       The title REPOSITORY for the first title may seem confusing. It is
29       essentially the image name. However, because you can tag a specific
30       image, and multiple tags (image instances) can be associated with a
31       single name, the name is really a repository for all tagged images of
32       the same name. For example consider an image called fedora. It may be
33       tagged with 18, 19, or 20, etc. to manage different versions.
34
35
36

OPTIONS

38       -a, --all=true|false
39          Show all images (by default filter out the intermediate image
40       layers). The default is false.
41
42
43       --digests=true|false
44          Show image digests. The default is false.
45
46
47       -f, --filter=[]
48          Filters the output based on these conditions:
49          - dangling=(true|false) - find unused images
50          - label=<key> or label=<key>=<value>
51          - before=(<image-name>[:tag]|<image-id>| ⟨image@digest⟩)
52          - since=(<image-name>[:tag]|<image-id>| ⟨image@digest⟩)
53
54
55       --format="TEMPLATE"
56          Pretty-print images using a Go template.
57          Valid placeholders:
58             .ID - Image ID
59             .Repository - Image repository
60             .Tag - Image tag
61             .Digest - Image digest
62             .CreatedSince - Elapsed time since the image was created
63             .CreatedAt - Time when the image was created
64             .Size - Image disk size
65
66
67       --help
68         Print usage statement
69
70
71       --no-trunc=true|false
72          Don't truncate output. The default is false.
73
74
75       -q, --quiet=true|false
76          Only show numeric IDs. The default is false.
77
78
79

EXAMPLES

Listing the images

82       To list the images in a local repository (not the registry) run:
83
84
85              docker images
86
87
88
89       The list will contain the image repository name, a tag for the image,
90       and an image ID, when it was created and its virtual size. Columns:
91       REPOSITORY, TAG, IMAGE ID, CREATED, and SIZE.
92
93
94       The docker images command takes an optional [REPOSITORY[:TAG]] argument
95       that restricts the list to images that match the argument. If you
96       specify REPOSITORYbut no TAG, the docker images command lists all
97       images in the given repository.
98
99
100              docker images java
101
102
103
104       The [REPOSITORY[:TAG]] value must be an "exact match". This means that,
105       for example, docker images jav does not match the image java.
106
107
108       If both REPOSITORY and TAG are provided, only images matching that
109       repository and tag are listed.  To find all local images in the "java"
110       repository with tag "8" you can use:
111
112
113              docker images java:8
114
115
116
117       To get a verbose list of images which contains all the intermediate
118       images used in builds use -a:
119
120
121              docker images -a
122
123
124
125       Previously, the docker images command supported the --tree and --dot
126       arguments, which displayed different visualizations of the image data.
127       Docker core removed this functionality in the 1.7 version. If you liked
128       this functionality, you can still find it in the third-party dockviz
129       tool: ⟨https://github.com/justone/dockviz⟩.
130
131

Listing images in a desired format

133       When using the --format option, the image command will either output
134       the data exactly as the template declares or, when using the table
135       directive, will include column headers as well. You can use special
136       characters like \t for inserting tab spacing between columns.
137
138
139       The following example uses a template without headers and outputs the
140       ID and Repository entries separated by a colon for all images:
141
142
143              docker images --format "{{.ID}}: {{.Repository}}"
144              77af4d6b9913: <none>
145              b6fa739cedf5: committ
146              78a85c484bad: ipbabble
147              30557a29d5ab: docker
148              5ed6274db6ce: <none>
149              746b819f315e: postgres
150              746b819f315e: postgres
151              746b819f315e: postgres
152              746b819f315e: postgres
153
154
155
156       To list all images with their repository and tag in a table format you
157       can use:
158
159
160              docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}"
161              IMAGE ID            REPOSITORY                TAG
162              77af4d6b9913        <none>                    <none>
163              b6fa739cedf5        committ                   latest
164              78a85c484bad        ipbabble                  <none>
165              30557a29d5ab        docker                    latest
166              5ed6274db6ce        <none>                    <none>
167              746b819f315e        postgres                  9
168              746b819f315e        postgres                  9.3
169              746b819f315e        postgres                  9.3.5
170              746b819f315e        postgres                  latest
171
172
173
174       Valid template placeholders are listed above.
175
176

Listing only the shortened image IDs

178       Listing just the shortened image IDs. This can be useful for some
179       automated tools.
180
181
182              docker images -q
183
184
185
186

HISTORY

188       April 2014, Originally compiled by William Henry (whenry at redhat dot
189       com) based on docker.com source material and internal work.  June 2014,
190       updated by Sven Dowideit ⟨SvenDowideit@home.org.au⟩
191
192
193
194Docker Community              Docker User Manuals                    DOCKER(1)
Impressum