summaryrefslogtreecommitdiff
path: root/pkg/ps
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-05 09:20:16 -0400
committerGitHub <noreply@github.com>2021-05-05 09:20:16 -0400
commita278195af3423f882c1f5bb218792f7c2ce10a3c (patch)
tree192e52054de2abf0c92d83ecdbc71d498c2ec947 /pkg/ps
parent8eefca5a257121b177562742c972e39e1686140d (diff)
parent0f7d54b0260c1be992ee3b9cee359ef3a9e8bd21 (diff)
downloadpodman-a278195af3423f882c1f5bb218792f7c2ce10a3c.tar.gz
podman-a278195af3423f882c1f5bb218792f7c2ce10a3c.tar.bz2
podman-a278195af3423f882c1f5bb218792f7c2ce10a3c.zip
Merge pull request #10147 from vrothberg/new-image-package
migrate Podman to containers/common/libimage
Diffstat (limited to 'pkg/ps')
-rw-r--r--pkg/ps/ps.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/ps/ps.go b/pkg/ps/ps.go
index b31978638..0b76636de 100644
--- a/pkg/ps/ps.go
+++ b/pkg/ps/ps.go
@@ -9,6 +9,7 @@ import (
"strings"
"time"
+ "github.com/containers/common/libimage"
"github.com/containers/podman/v3/libpod"
"github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/pkg/domain/entities"
@@ -257,12 +258,13 @@ func ListStorageContainer(rt *libpod.Runtime, ctr storage.Container, opts entiti
imageName := ""
if ctr.ImageID != "" {
- names, err := rt.ImageRuntime().ImageNames(ctr.ImageID)
+ lookupOptions := &libimage.LookupImageOptions{IgnorePlatform: true}
+ image, _, err := rt.LibimageRuntime().LookupImage(ctr.ImageID, lookupOptions)
if err != nil {
return ps, err
}
- if len(names) > 0 {
- imageName = names[0]
+ if len(image.NamesHistory()) > 0 {
+ imageName = image.NamesHistory()[0]
}
} else if buildahCtr {
imageName = "scratch"