dotcloud/docker — pull request #1924 by rculbertson (2013-09-19 00:09:28+00:00)
Title: added -i option to ps to filter results by image name

Added option to ps command which allows you to filter results by the image name containers are based on. This can be used in conjunction with the rm command to easily delete groups of containers. For example, this would delete all containers based on any ubuntu image.

docker ps -a -q -i ubuntu* | xargs docker rm

The parameter is interpreted using the path.Match function, so wildcards are allowed. path.Match is used instead of regexp.MatchString to mirror the functionality of the image filter in https://github.com/dotcloud/docker/pull/1817.