summaryrefslogtreecommitdiff
path: root/api/server/router
diff options
context:
space:
mode:
authorNicolas De Loof <nicolas.deloof@gmail.com>2022-07-06 14:24:38 +0200
committerDjordje Lukic <djordje.lukic@docker.com>2023-01-05 16:20:41 +0100
commit1616a09b613b07e56926ae23b1ae710f9a2c64fe (patch)
tree911d86924ae4e9de2be5db9c46cb8bf07e822345 /api/server/router
parent3e39ec60dab859f70577ea8561fe5bda5236749e (diff)
downloaddocker-1616a09b613b07e56926ae23b1ae710f9a2c64fe.tar.gz
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 <djordje.lukic@docker.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'api/server/router')
-rw-r--r--api/server/router/image/image_routes.go3
1 files changed, 1 insertions, 2 deletions
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))