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:
parent
f2bc7ebf1e
commit
35bcba8011
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue