Update filtering chapters on ps/images references

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 61de442c49a56f9fc6f82174c97e1229e8aa39f2
Component: engine
This commit is contained in:
Vincent Demeester
2015-08-27 08:47:03 +02:00
parent 26c8e31eba
commit 59e5fcdd6a
2 changed files with 122 additions and 3 deletions

View File

@ -123,7 +123,7 @@ The currently supported filters are:
* dangling (boolean - true or false)
* label (`label=<key>` or `label=<key>=<value>`)
##### Untagged images
##### Untagged images (dangling)
$ docker images --filter "dangling=true"
@ -155,3 +155,27 @@ Ready for use by `docker rmi ...`, like:
NOTE: Docker will warn you if any containers exist that are using these untagged images.
##### Labeled images
The `label` filter matches images based on the presence of a `label` alone or a `label` and a
value.
The following filter matches images with the `com.example.version` label regardless of its value.
$ docker images --filter "label=com.example.version"
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
match-me-1 latest eeae25ada2aa About a minute ago 188.3 MB
match-me-2 latest eeae25ada2aa About a minute ago 188.3 MB
The following filter matches images with the `com.example.version` label with the `1.0` value.
$ docker images --filter "label=com.example.version=1.0"
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
match-me latest eeae25ada2aa About a minute ago 188.3 MB
In this example, with the `0.1` value, it returns an empty set because no matches were found.
$ docker images --filter "label=com.example.version=0.1"
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE