summaryrefslogtreecommitdiff
path: root/cmd/podman/images/list.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-08 07:28:16 -0400
committerGitHub <noreply@github.com>2022-04-08 07:28:16 -0400
commit0c9c3e6714905fbb493e0b634e09b56ae096592e (patch)
tree303888c404656f78af9b1a2b3e577386bf68cc96 /cmd/podman/images/list.go
parent4bd35cb01f03fd90ff304f666e53fcd222ad77f9 (diff)
parente133a06d2f4a3e94bfbd60b647046f2f515c9c24 (diff)
downloadpodman-0c9c3e6714905fbb493e0b634e09b56ae096592e.tar.gz
podman-0c9c3e6714905fbb493e0b634e09b56ae096592e.tar.bz2
podman-0c9c3e6714905fbb493e0b634e09b56ae096592e.zip
Merge pull request #13810 from vrothberg/images-size
images --size
Diffstat (limited to 'cmd/podman/images/list.go')
-rw-r--r--cmd/podman/images/list.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go
index 9bddf1cff..10a2a4f87 100644
--- a/cmd/podman/images/list.go
+++ b/cmd/podman/images/list.go
@@ -87,6 +87,7 @@ func imageListFlagSet(cmd *cobra.Command) {
flags := cmd.Flags()
flags.BoolVarP(&listOptions.All, "all", "a", false, "Show all images (default hides intermediate images)")
+ flags.BoolVarP(&listOptions.Size, "size", "", true, "Compute the size of each image")
filterFlagName := "filter"
flags.StringSliceVarP(&listOptions.Filter, filterFlagName, "f", []string{}, "Filter output based on conditions provided (default [])")
@@ -320,7 +321,10 @@ func lsFormatFromFlags(flags listFlagType) string {
row = append(row, "{{.Digest}}")
}
- row = append(row, "{{.ID}}", "{{.Created}}", "{{.Size}}")
+ row = append(row, "{{.ID}}", "{{.Created}}")
+ if listOptions.Size {
+ row = append(row, "{{.Size}}")
+ }
if flags.history {
row = append(row, "{{if .History}}{{.History}}{{else}}<none>{{end}}")