diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-07-27 10:57:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 10:57:21 +0200 |
commit | d7b2f03f8a5d0e3789ac185ea03989463168fb76 (patch) | |
tree | 3918f9d850ac3d7f8354872541bbd04af7862608 /pkg/domain/infra | |
parent | 4f5b19c5080543974c3498804b43d277271b2f33 (diff) | |
parent | 1b6423e9f172b6d2437011ef4504a8247728a73d (diff) | |
download | podman-d7b2f03f8a5d0e3789ac185ea03989463168fb76.tar.gz podman-d7b2f03f8a5d0e3789ac185ea03989463168fb76.tar.bz2 podman-d7b2f03f8a5d0e3789ac185ea03989463168fb76.zip |
Merge pull request #10983 from vrothberg/fix-dangling
refine dangling checks
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r-- | pkg/domain/infra/abi/images_list.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/images_list.go b/pkg/domain/infra/abi/images_list.go index b0e947991..2ec4ad244 100644 --- a/pkg/domain/infra/abi/images_list.go +++ b/pkg/domain/infra/abi/images_list.go @@ -30,12 +30,16 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions) for j, d := range img.Digests() { digests[j] = string(d) } + isDangling, err := img.IsDangling(ctx) + if err != nil { + return nil, errors.Wrapf(err, "error checking if image %q is dangling", img.ID()) + } e := entities.ImageSummary{ ID: img.ID(), // ConfigDigest: string(img.ConfigDigest), Created: img.Created().Unix(), - Dangling: img.IsDangling(), + Dangling: isDangling, Digest: string(img.Digest()), RepoDigests: digests, History: img.NamesHistory(), |