diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-09 12:15:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 12:15:46 -0400 |
commit | 49cb0edd651848d1e731b77412ed9d47a34fe0a7 (patch) | |
tree | 0ae031547c8fb6152f39e3e8339e25fbaf66e34f /libpod/image/image.go | |
parent | 5a09fd8f2b8e624a8d4155fd4fc89f51e544e2ca (diff) | |
parent | 581afbb86f441c94c6dd49fe93dff935de7af340 (diff) | |
download | podman-49cb0edd651848d1e731b77412ed9d47a34fe0a7.tar.gz podman-49cb0edd651848d1e731b77412ed9d47a34fe0a7.tar.bz2 podman-49cb0edd651848d1e731b77412ed9d47a34fe0a7.zip |
Merge pull request #7290 from rhatdan/external
Show c/storage (Buildah/CRI-O) containers in ps
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r-- | libpod/image/image.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index 9dd04e7c7..850a48eae 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -636,6 +636,14 @@ func (ir *Runtime) getImage(image string) (*storage.Image, error) { return img, nil } +func (ir *Runtime) ImageNames(id string) ([]string, error) { + myImage, err := ir.getImage(id) + if err != nil { + return nil, errors.Wrapf(err, "error getting image %s ", id) + } + return myImage.Names, nil +} + // GetImages retrieves all images present in storage func (ir *Runtime) GetImages() ([]*Image, error) { return ir.getImages(false) |