summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-21 17:13:36 +0200
committerGitHub <noreply@github.com>2020-05-21 17:13:36 +0200
commit363f8820bc6d9ee19d2c95cfcbb05e93938cd53c (patch)
tree039de0bf1249b2762fa385ee8397ce569c83b9c0 /cmd/podman
parent58baeab3303f0a666bca1f3dce706908f60626e1 (diff)
parent9add1abd12bbadef3dac778a72072fae3cb9c08b (diff)
downloadpodman-363f8820bc6d9ee19d2c95cfcbb05e93938cd53c.tar.gz
podman-363f8820bc6d9ee19d2c95cfcbb05e93938cd53c.tar.bz2
podman-363f8820bc6d9ee19d2c95cfcbb05e93938cd53c.zip
Merge pull request #6312 from rhatdan/image
Fix remote handling of podman images calls
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/images/list.go14
-rw-r--r--cmd/podman/images/prune.go6
2 files changed, 10 insertions, 10 deletions
diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go
index 83c039ed3..022c90f71 100644
--- a/cmd/podman/images/list.go
+++ b/cmd/podman/images/list.go
@@ -85,7 +85,7 @@ func images(cmd *cobra.Command, args []string) error {
return errors.New("cannot specify an image and a filter(s)")
}
- if len(listOptions.Filter) < 1 && len(args) > 0 {
+ if len(args) > 0 {
listOptions.Filter = append(listOptions.Filter, "reference="+args[0])
}
@@ -152,10 +152,16 @@ func writeTemplate(imageS []*entities.ImageSummary) error {
)
imgs := make([]imageReporter, 0, len(imageS))
for _, e := range imageS {
- for _, tag := range e.RepoTags {
- var h imageReporter
+ var h imageReporter
+ if len(e.RepoTags) > 0 {
+ for _, tag := range e.RepoTags {
+ h.ImageSummary = *e
+ h.Repository, h.Tag = tokenRepoTag(tag)
+ imgs = append(imgs, h)
+ }
+ } else {
h.ImageSummary = *e
- h.Repository, h.Tag = tokenRepoTag(tag)
+ h.Repository = "<none>"
imgs = append(imgs, h)
}
listFlag.readOnly = e.IsReadOnly()
diff --git a/cmd/podman/images/prune.go b/cmd/podman/images/prune.go
index 7c9e3eb61..676382a99 100644
--- a/cmd/podman/images/prune.go
+++ b/cmd/podman/images/prune.go
@@ -61,12 +61,6 @@ Are you sure you want to continue? [y/N] `)
}
}
- // TODO Remove once filter refactor is finished and url.Values rules :)
- for _, f := range filter {
- t := strings.SplitN(f, "=", 2)
- pruneOpts.Filters.Add(t[0], t[1])
- }
-
results, err := registry.ImageEngine().Prune(registry.GetContext(), pruneOpts)
if err != nil {
return err