Add before and since filter to images

Add support for two now filter on the `images` command : `before` and
`since`. They work the same as the one on the `ps` command but for
images.

        $ docker images --filter before=myimage
        # display all images older than myimage
        $ docker images --filter since=myimage
        # display all images younger than myimage

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2017-06-02 00:07:40 +00:00
committed by Tibor Vass
parent dd83546376
commit aac0a3ee13
4 changed files with 66 additions and 6 deletions
+5 -1
View File
@@ -38,7 +38,11 @@ versions.
Show image digests. The default is *false*.
**-f**, **--filter**=[]
Filters the output. The dangling=true filter finds unused images. While label=com.foo=amd64 filters for images with a com.foo value of amd64. The label=com.foo filter finds images with the label com.foo of any value.
Filters the output based on these conditions:
- dangling=(true|false) - finds unused images.
- label=<key> or label=<key>=<value>
- before=(<image-name>[:tag]|<image-id>|<image@digest>)
- since=(<image-name>[:tag]|<image-id>|<image@digest>)
**--format**="*TEMPLATE*"
Pretty-print containers using a Go template.