From 58dcba9dc1c87091396f2fa692bf7dc95af5e22e Mon Sep 17 00:00:00 2001 From: Kyle Quest Date: Mon, 14 Dec 2020 20:05:59 -0800 Subject: [PATCH] fix for the removed filter parameter in the List Images API in Docker 20.10 - https://github.com/moby/moby/pull/40491 --- pkg/docker/dockerutil/dockerutil.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/docker/dockerutil/dockerutil.go b/pkg/docker/dockerutil/dockerutil.go index 97c0670f80..6cdc657b5d 100755 --- a/pkg/docker/dockerutil/dockerutil.go +++ b/pkg/docker/dockerutil/dockerutil.go @@ -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) @@ -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)