mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 13:11:30 +00:00
filter image listing using path.Match
This commit is contained in:
@@ -211,7 +211,7 @@ 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 != "" {
|
||||
if match, _ := path.Match ( filter, name ); !match {
|
||||
if match, _ := path.Match(filter, name); !match {
|
||||
continue
|
||||
}
|
||||
}
|
||||
@@ -681,7 +681,7 @@ func (srv *Server) getImageList(localRepo map[string]string) ([][]*registry.ImgD
|
||||
depGraph.NewNode(img.ID)
|
||||
img.WalkHistory(func(current *Image) error {
|
||||
imgList[current.ID] = ®istry.ImgData{
|
||||
ID: current.ID,
|
||||
ID: current.ID,
|
||||
Tag: tag,
|
||||
}
|
||||
parent, err := current.GetParent()
|
||||
|
||||
Reference in New Issue
Block a user