1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

improve image listing

This commit is contained in:
Martin Redmond 2013-09-06 15:51:49 -04:00
parent f2bc7ebf1e
commit 35bcba8011

View file

@ -210,8 +210,10 @@ func (srv *Server) Images(all bool, filter string) ([]APIImages, error) {
}
outs := []APIImages{} //produce [] when empty instead of 'null'
for name, repository := range srv.runtime.repositories.Repositories {
if filter != "" && name != filter {
continue
if filter != "" {
if match, _ := path.Match ( filter, name ); !match {
continue
}
}
for tag, id := range repository {
var out APIImages