Browse code

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 <h.huangqiang@huawei.com>

Qiang Huang authored on 2014/09/23 09:42:32
Showing 1 changed files
... ...
@@ -149,6 +149,7 @@ func (s *TagStore) CmdLookup(job *engine.Job) engine.Status {
149 149
 		out.Set("Architecture", image.Architecture)
150 150
 		out.Set("Os", image.OS)
151 151
 		out.SetInt64("Size", image.Size)
152
+		out.SetInt64("VirtualSize", image.GetParentsSize(0)+image.Size)
152 153
 		if _, err = out.WriteTo(job.Stdout); err != nil {
153 154
 			return job.Error(err)
154 155
 		}