dockershim: Return Labels as Info in ImageStatus.

c6ddc749e8 added an Info field to
ImageStatusResponse when Verbose is true. This makes the image's
Labels available in that field, rather than unconditionally returning
an empty map.
This commit is contained in:
Shea Levy 2018-02-07 20:38:24 -05:00 committed by Shea Levy
parent eff9f75f70
commit 48af739893
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27

View File

@ -76,7 +76,11 @@ func (ds *dockerService) ImageStatus(_ context.Context, r *runtimeapi.ImageStatu
return nil, err
}
return &runtimeapi.ImageStatusResponse{Image: imageStatus}, nil
res := runtimeapi.ImageStatusResponse{Image: imageStatus}
if r.GetVerbose() {
res.Info = imageInspect.Config.Labels
}
return &res, nil
}
// PullImage pulls an image with authentication config.