aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-17 09:36:49 -0400
committerGitHub <noreply@github.com>2020-09-17 09:36:49 -0400
commitd8414add00da27098267b8bd400cb5b045e8be96 (patch)
treeb71894a84b49d6ffcdbf0358d644bbe9f92a395b /pkg/domain/infra
parent98aa458c7a13c72fabe02cd0ed2919c2801ef207 (diff)
parentecae5f7adeb1acea9c090c3d6c43f7470f33ac84 (diff)
downloadpodman-d8414add00da27098267b8bd400cb5b045e8be96.tar.gz
podman-d8414add00da27098267b8bd400cb5b045e8be96.tar.bz2
podman-d8414add00da27098267b8bd400cb5b045e8be96.zip
Merge pull request #7654 from vrothberg/fix-7651
image list: return all associated names
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/images_list.go24
1 files changed, 2 insertions, 22 deletions
diff --git a/pkg/domain/infra/abi/images_list.go b/pkg/domain/infra/abi/images_list.go
index 7ec84246d..3e47dc67a 100644
--- a/pkg/domain/infra/abi/images_list.go
+++ b/pkg/domain/infra/abi/images_list.go
@@ -23,33 +23,13 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions)
summaries := []*entities.ImageSummary{}
for _, img := range images {
- var repoTags []string
- if opts.All {
- pairs, err := libpodImage.ReposToMap(img.Names())
- if err != nil {
- return nil, err
- }
-
- for repo, tags := range pairs {
- for _, tag := range tags {
- repoTags = append(repoTags, repo+":"+tag)
- }
- }
- } else {
- repoTags, err = img.RepoTags()
- if err != nil {
- return nil, err
- }
- }
-
digests := make([]string, len(img.Digests()))
for j, d := range img.Digests() {
digests[j] = string(d)
}
e := entities.ImageSummary{
- ID: img.ID(),
-
+ ID: img.ID(),
ConfigDigest: string(img.ConfigDigest),
Created: img.Created().Unix(),
Dangling: img.Dangling(),
@@ -61,7 +41,7 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions)
ReadOnly: img.IsReadOnly(),
SharedSize: 0,
VirtualSize: img.VirtualSize,
- RepoTags: repoTags,
+ RepoTags: img.Names(), // may include tags and digests
}
e.Labels, _ = img.Labels(context.TODO())