summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-10 12:31:28 +0200
committerGitHub <noreply@github.com>2021-10-10 12:31:28 +0200
commit0a653153ef8e417def0ae341004df36a23761991 (patch)
treef02d605fabf8277f03040cf335ecf33b2932cb4a /pkg/domain
parentc1cb0162498038739d57b9b21a68eb7d93284056 (diff)
parentfad14dafe186bb6cebfd7987db9cd15aa2a23585 (diff)
downloadpodman-0a653153ef8e417def0ae341004df36a23761991.tar.gz
podman-0a653153ef8e417def0ae341004df36a23761991.tar.bz2
podman-0a653153ef8e417def0ae341004df36a23761991.zip
Merge pull request #11893 from vrothberg/vendor-common
faster image inspection
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/images.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index c06059205..8a0b87cab 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -252,6 +252,8 @@ func (ir *ImageEngine) Pull(ctx context.Context, rawImage string, options entiti
func (ir *ImageEngine) Inspect(ctx context.Context, namesOrIDs []string, opts entities.InspectOptions) ([]*entities.ImageInspectReport, []error, error) {
reports := []*entities.ImageInspectReport{}
errs := []error{}
+
+ inspectOptions := &libimage.InspectOptions{WithParent: true, WithSize: true}
for _, i := range namesOrIDs {
img, _, err := ir.Libpod.LibimageRuntime().LookupImage(i, nil)
if err != nil {
@@ -259,7 +261,7 @@ func (ir *ImageEngine) Inspect(ctx context.Context, namesOrIDs []string, opts en
errs = append(errs, err)
continue
}
- result, err := img.Inspect(ctx, true)
+ result, err := img.Inspect(ctx, inspectOptions)
if err != nil {
// This is more likely to be fatal.
return nil, nil, err