Merge pull request #1530 from aiordache/recreate_after_build

This commit is contained in:
Nicolas De loof 2021-04-20 21:05:37 +02:00 committed by GitHub
commit cd4a08d0d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 130 additions and 78 deletions

View file

@ -99,8 +99,15 @@ func runImages(ctx context.Context, opts imageOptions, services []string) error
for _, img := range images {
id := stringid.TruncateID(img.ID)
size := units.HumanSizeWithPrecision(float64(img.Size), 3)
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", img.ContainerName, img.Repository, img.Tag, id, size)
repo := img.Repository
if repo == "" {
repo = "<none>"
}
tag := img.Tag
if tag == "" {
tag = "<none>"
}
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", img.ContainerName, repo, tag, id, size)
}
},
"Container", "Repository", "Tag", "Image Id", "Size")