diff options
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) |