Skip to content

Commit

Permalink
fix for the removed filter parameter in the List Images API in Docker…
Browse files Browse the repository at this point in the history
… 20.10 - moby/moby#40491
  • Loading branch information
kcq committed Dec 15, 2020
1 parent fa8ef5e commit 58dcba9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pkg/docker/dockerutil/dockerutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ func HasImage(dclient *dockerapi.Client, imageRef string) error {
}

listOptions := dockerapi.ListImagesOptions{
Filter: imageRef,
All: false,
Filters: map[string][]string{
"reference": {imageRef},
},
All: false,
}

imageList, err := dclient.ListImages(listOptions)
Expand Down Expand Up @@ -121,8 +123,10 @@ func ListImages(dclient *dockerapi.Client, imageNameFilter string) (map[string]B
}

listOptions := dockerapi.ListImagesOptions{
Filter: imageNameFilter,
All: false,
Filters: map[string][]string{
"reference": {imageNameFilter},
},
All: false,
}

imageList, err := dclient.ListImages(listOptions)
Expand Down

0 comments on commit 58dcba9

Please sign in to comment.