From efba4047a0ebaec87adac5722218798349aed514 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 Upstream-commit: ec000cbf30426e745e31a406ecc1c7b1854b1220 Component: engine --- components/engine/graph/service.go | 1 + 1 file changed, 1 insertion(+) diff --git a/components/engine/graph/service.go b/components/engine/graph/service.go index 4fb0433c0c..1be986f8d5 100644 --- a/components/engine/graph/service.go +++ b/components/engine/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) }