From 1616a09b613b07e56926ae23b1ae710f9a2c64fe Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Wed, 6 Jul 2022 14:24:38 +0200 Subject: add support for image inspect with containerd-integration This is a squashed version of various PRs (or related code-changes) to implement image inspect with the containerd-integration; - add support for image inspect - introduce GetImageOpts to manage image inspect data in backend - GetImage to return image tags with details - list images matching digest to discover all tags - Add ExposedPorts and Volumes to the image returned - Refactor resolving/getting images - Return the image ID on inspect - consider digest and ignore tag when both are set - docker run --platform Signed-off-by: Djordje Lukic Signed-off-by: Nicolas De Loof Signed-off-by: Sebastiaan van Stijn --- api/server/router/image/image_routes.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'api/server') diff --git a/api/server/router/image/image_routes.go b/api/server/router/image/image_routes.go index 16c9eccc7d..ab64b1511a 100644 --- a/api/server/router/image/image_routes.go +++ b/api/server/router/image/image_routes.go @@ -206,9 +206,8 @@ func (ir *imageRouter) getImagesByName(ctx context.Context, w http.ResponseWrite } func (ir *imageRouter) toImageInspect(img *image.Image) (*types.ImageInspect, error) { - refs := ir.referenceBackend.References(img.ID().Digest()) var repoTags, repoDigests []string - for _, ref := range refs { + for _, ref := range img.Details.References { switch ref.(type) { case reference.NamedTagged: repoTags = append(repoTags, reference.FamiliarString(ref)) -- cgit v1.2.1