2014-04-16 14:07:55 -04:00
|
|
|
% DOCKER(1) Docker User Manuals
|
2014-06-30 22:58:04 -04:00
|
|
|
% Docker Community
|
|
|
|
% JUNE 2014
|
2014-04-16 14:07:55 -04:00
|
|
|
# NAME
|
2014-06-30 22:58:04 -04:00
|
|
|
docker-images - List images
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
**docker images**
|
2014-10-15 17:14:12 -04:00
|
|
|
[**--help**]
|
2015-12-23 09:37:06 -05:00
|
|
|
[**-a**|**--all**]
|
|
|
|
[**--digests**]
|
2014-06-30 22:58:04 -04:00
|
|
|
[**-f**|**--filter**[=*[]*]]
|
2016-10-28 10:31:20 -04:00
|
|
|
[**--format**=*"TEMPLATE"*]
|
2015-12-23 09:37:06 -05:00
|
|
|
[**--no-trunc**]
|
|
|
|
[**-q**|**--quiet**]
|
2015-08-08 09:58:48 -04:00
|
|
|
[REPOSITORY[:TAG]]
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
This command lists the images stored in the local Docker repository.
|
|
|
|
|
|
|
|
By default, intermediate images, used during builds, are not listed. Some of the
|
2014-06-29 21:31:15 -04:00
|
|
|
output, e.g., image ID, is truncated, for space reasons. However the truncated
|
2014-04-16 14:07:55 -04:00
|
|
|
image ID, and often the first few characters, are enough to be used in other
|
|
|
|
Docker commands that use the image ID. The output includes repository, tag, image
|
2014-04-17 11:36:58 -04:00
|
|
|
ID, date created and the virtual size.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
The title REPOSITORY for the first title may seem confusing. It is essentially
|
|
|
|
the image name. However, because you can tag a specific image, and multiple tags
|
2014-04-17 11:36:58 -04:00
|
|
|
(image instances) can be associated with a single name, the name is really a
|
2014-04-16 14:07:55 -04:00
|
|
|
repository for all tagged images of the same name. For example consider an image
|
|
|
|
called fedora. It may be tagged with 18, 19, or 20, etc. to manage different
|
|
|
|
versions.
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
**-a**, **--all**=*true*|*false*
|
2014-06-30 22:58:04 -04:00
|
|
|
Show all images (by default filter out the intermediate image layers). The default is *false*.
|
|
|
|
|
2015-02-26 21:23:50 -05:00
|
|
|
**--digests**=*true*|*false*
|
|
|
|
Show image digests. The default is *false*.
|
|
|
|
|
2014-06-30 22:58:04 -04:00
|
|
|
**-f**, **--filter**=[]
|
2016-05-25 07:49:10 -04:00
|
|
|
Filters the output based on these conditions:
|
2016-10-28 10:31:20 -04:00
|
|
|
- dangling=(true|false) - find unused images
|
2016-05-25 07:49:10 -04:00
|
|
|
- label=<key> or label=<key>=<value>
|
|
|
|
- before=(<image-name>[:tag]|<image-id>|<image@digest>)
|
|
|
|
- since=(<image-name>[:tag]|<image-id>|<image@digest>)
|
2014-04-16 14:07:55 -04:00
|
|
|
|
2015-12-18 08:03:41 -05:00
|
|
|
**--format**="*TEMPLATE*"
|
2016-09-02 05:51:41 -04:00
|
|
|
Pretty-print images using a Go template.
|
2015-12-18 08:03:41 -05:00
|
|
|
Valid placeholders:
|
|
|
|
.ID - Image ID
|
|
|
|
.Repository - Image repository
|
|
|
|
.Tag - Image tag
|
|
|
|
.Digest - Image digest
|
2016-10-28 10:31:20 -04:00
|
|
|
.CreatedSince - Elapsed time since the image was created
|
|
|
|
.CreatedAt - Time when the image was created
|
|
|
|
.Size - Image disk size
|
2015-12-18 08:03:41 -05:00
|
|
|
|
2014-10-15 17:14:12 -04:00
|
|
|
**--help**
|
|
|
|
Print usage statement
|
|
|
|
|
2014-04-16 14:07:55 -04:00
|
|
|
**--no-trunc**=*true*|*false*
|
2014-06-30 22:58:04 -04:00
|
|
|
Don't truncate output. The default is *false*.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
**-q**, **--quiet**=*true*|*false*
|
2014-06-30 22:58:04 -04:00
|
|
|
Only show numeric IDs. The default is *false*.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
# EXAMPLES
|
|
|
|
|
|
|
|
## Listing the images
|
|
|
|
|
|
|
|
To list the images in a local repository (not the registry) run:
|
|
|
|
|
|
|
|
docker images
|
|
|
|
|
|
|
|
The list will contain the image repository name, a tag for the image, and an
|
|
|
|
image ID, when it was created and its virtual size. Columns: REPOSITORY, TAG,
|
2016-02-02 00:57:59 -05:00
|
|
|
IMAGE ID, CREATED, and SIZE.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
2015-08-08 09:58:48 -04:00
|
|
|
The `docker images` command takes an optional `[REPOSITORY[:TAG]]` argument
|
|
|
|
that restricts the list to images that match the argument. If you specify
|
|
|
|
`REPOSITORY`but no `TAG`, the `docker images` command lists all images in the
|
|
|
|
given repository.
|
|
|
|
|
|
|
|
docker images java
|
|
|
|
|
|
|
|
The `[REPOSITORY[:TAG]]` value must be an "exact match". This means that, for example,
|
|
|
|
`docker images jav` does not match the image `java`.
|
|
|
|
|
|
|
|
If both `REPOSITORY` and `TAG` are provided, only images matching that
|
|
|
|
repository and tag are listed. To find all local images in the "java"
|
|
|
|
repository with tag "8" you can use:
|
|
|
|
|
|
|
|
docker images java:8
|
|
|
|
|
2014-04-17 11:36:58 -04:00
|
|
|
To get a verbose list of images which contains all the intermediate images
|
|
|
|
used in builds use **-a**:
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
docker images -a
|
|
|
|
|
2015-05-24 17:58:42 -04:00
|
|
|
Previously, the docker images command supported the --tree and --dot arguments,
|
|
|
|
which displayed different visualizations of the image data. Docker core removed
|
|
|
|
this functionality in the 1.7 version. If you liked this functionality, you can
|
|
|
|
still find it in the third-party dockviz tool: https://github.com/justone/dockviz.
|
|
|
|
|
2014-04-16 14:07:55 -04:00
|
|
|
## Listing only the shortened image IDs
|
|
|
|
|
2014-04-17 11:36:58 -04:00
|
|
|
Listing just the shortened image IDs. This can be useful for some automated
|
|
|
|
tools.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
docker images -q
|
|
|
|
|
|
|
|
# HISTORY
|
2014-04-17 11:36:58 -04:00
|
|
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
2014-07-01 20:30:25 -04:00
|
|
|
based on docker.com source material and internal work.
|
2014-06-30 22:58:04 -04:00
|
|
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|