filters, for images: docs

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
master
Vincent Batts 2014-03-26 14:58:33 -04:00 committed by Tibor Vass
parent 1d715defb8
commit 1f269e43a4
1 changed files with 20 additions and 6 deletions

View File

@ -598,12 +598,13 @@ To see how the ``docker:latest`` image was built:
List images
-a, --all=false: Show all images (by default filter out the intermediate images used to build)
-f, --filter=[]: Provide filter values (i.e. 'tagged=false')
--no-trunc=false: Don't truncate output
-q, --quiet=false: Only show numeric IDs
-t, --tree=false: Output graph in tree format
-u, --untagged show only untagged images
-v, --viz=false: Output graph in graphviz format
Listing the most recently created images
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -678,12 +679,25 @@ Displaying image hierarchy
└─c96a99614930 Size: 12.29 kB (virtual 642.2 MB)
└─a6a357a48c49 Size: 12.29 kB (virtual 642.2 MB) Tags: ndj/mongodb:latest
Displaying untagged (orphan) images
~~~~~~~~~~~~~~~~~~~~~~~~~~
Filtering
~~~~~~~~~
The filtering flag (-f or --filter) format is of "key=value". If there are more
than one flag, then either semi-colon delimit (";"), or pass multiple flags.
Current filters:
* tagged (boolean - true or false)
* untagged (boolean - true or false)
Filtering for untagged images
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: bash
$ sudo docker images --untagged
$ sudo docker images --filter "tagged=false"
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> 8abc22fbb042 4 weeks ago 0 B
@ -702,7 +716,7 @@ By having this flag it allows for batch cleanup.
.. code-block:: bash
$ sudo docker images --untagged -q
$ sudo docker images -f "untagged=true" -q
8abc22fbb042
48e5f45168b9
@ -716,7 +730,7 @@ Ready for use by `docker rmi ...`, like:
.. code-block:: bash
$ sudo docker rmi $(sudo docker images --untagged -q)
$ sudo docker rmi $(sudo docker images -f "untagged=true" -q)
8abc22fbb042
48e5f45168b9