From 67f663c7bfeab238aea0e6611b56326ca34ea4da Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Thu, 20 Aug 2015 09:57:15 +0200 Subject: [PATCH] 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 --- docs/reference/commandline/ps.md | 1 + man/docker-ps.1.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/reference/commandline/ps.md b/docs/reference/commandline/ps.md index 0e3335483b..328cac76b4 100644 --- a/docs/reference/commandline/ps.md +++ b/docs/reference/commandline/ps.md @@ -50,6 +50,7 @@ The currently supported filters are: * name (container's name) * exited (int - the code of exited containers. Only useful with `--all`) * status (created|restarting|running|paused|exited) +* ancestor (`[:]`, `` or ``) - filters containers that were created from the given image or a descendant. #### Label diff --git a/man/docker-ps.1.md b/man/docker-ps.1.md index 0fdf7ccc93..5e21926d73 100644 --- a/man/docker-ps.1.md +++ b/man/docker-ps.1.md @@ -41,6 +41,8 @@ the running containers. status=(created|restarting|running|paused|exited) name= - container's name id= - container's ID + ancestor=([:tag]||) - filters containers that were + created from the given image or a descendant. **-l**, **--latest**=*true*|*false* Show only the latest created container, include non-running ones. The default is *false*.