From ec000cbf30426e745e31a406ecc1c7b1854b1220 Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Tue, 23 Sep 2014 08:42:32 +0800 Subject: [PATCH] graph: add VirtualSize for inspect output Currently inspect output just shows Size info, and that usally be very small and even 0 which is confusing. Fixes #8016 Signed-off-by: Qiang Huang --- graph/service.go | 1 + 1 file changed, 1 insertion(+) diff --git a/graph/service.go b/graph/service.go index 4fb0433c0..1be986f8d 100644 --- a/graph/service.go +++ b/graph/service.go @@ -149,6 +149,7 @@ func (s *TagStore) CmdLookup(job *engine.Job) engine.Status { out.Set("Architecture", image.Architecture) out.Set("Os", image.OS) out.SetInt64("Size", image.Size) + out.SetInt64("VirtualSize", image.GetParentsSize(0)+image.Size) if _, err = out.WriteTo(job.Stdout); err != nil { return job.Error(err) }