feat: bump docker versions, remove deprecations

This commit is contained in:
Jan Rundshagen 2024-07-08 16:43:55 +02:00 committed by Jan O. Rundshagen
parent 034de76896
commit 784f871878
6 changed files with 73 additions and 83 deletions

View file

@ -13,6 +13,7 @@ import (
t "github.com/beatkind/watchtower/pkg/types"
"github.com/docker/docker/api/types"
I "github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/filters"
O "github.com/onsi/gomega"
"github.com/onsi/gomega/ghttp"
@ -262,12 +263,12 @@ func RemoveImageHandler(imagesWithParents map[string][]string) http.HandlerFunc
image := parts[len(parts)-1]
if parents, found := imagesWithParents[image]; found {
items := []types.ImageDeleteResponseItem{
items := []I.DeleteResponse{
{Untagged: image},
{Deleted: image},
}
for _, parent := range parents {
items = append(items, types.ImageDeleteResponseItem{Deleted: parent})
items = append(items, I.DeleteResponse{Deleted: parent})
}
ghttp.RespondWithJSONEncoded(http.StatusOK, items)(w, r)
} else {