Add 'ancestor' ps filter for image

Makes it possible to filter containers by image, using
--filter=ancestor=busybox and get all the container running busybox
image and image based on busybox (to the bottom).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2015-08-20 09:57:15 +02:00 committed by Tibor Vass
parent 23effb34d7
commit 67f663c7bf
2 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,7 @@ The currently supported filters are:
* name (container's name) * name (container's name)
* exited (int - the code of exited containers. Only useful with `--all`) * exited (int - the code of exited containers. Only useful with `--all`)
* status (created|restarting|running|paused|exited) * status (created|restarting|running|paused|exited)
* ancestor (`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) - filters containers that were created from the given image or a descendant.
#### Label #### Label

View File

@ -41,6 +41,8 @@ the running containers.
status=(created|restarting|running|paused|exited) status=(created|restarting|running|paused|exited)
name=<string> - container's name name=<string> - container's name
id=<ID> - container's ID id=<ID> - container's ID
ancestor=(<image-name>[:tag]|<image-id>|<image@digest>) - filters containers that were
created from the given image or a descendant.
**-l**, **--latest**=*true*|*false* **-l**, **--latest**=*true*|*false*
Show only the latest created container, include non-running ones. The default is *false*. Show only the latest created container, include non-running ones. The default is *false*.