dotcloud/docker — pull request #414 by vieux (2013-04-16 16:14:54+00:00)
Title: added sizes on docker ps and docker images

Fixes #22

## containers

display size of rw and if available size of rootfs, in this exemple, only the last one is running:

./bin/docker ps -a
ID IMAGE COMMAND CREATED STATUS SIZE
1467f91a2709 base:latest /bin/bash 30 hours ago Exit 0 16K
25b1a4d9d238 base:latest /bin/bash 30 hours ago Exit -127 16K (virtual 4K)
889eed10d120 base:latest /bin/bash 30 hours ago Exit 0 16K
06776824bc28 base:latest /bin/bash 30 hours ago Exit 0 16K
6fb4de5c4bea base:latest /bin/bash 30 hours ago Exit 0 16K
019bac054a0c base:latest /bin/bash 31 hours ago Exit 0 4K (virtual 4K)
77530940f940 base:latest /bin/bash 31 hours ago Exit 0 4K (virtual 4K)
1cae820e12ca base:latest /bin/bash 31 hours ago Exit 0 4K (virtual 4K)
e295719906dd base:latest /bin/bash 31 hours ago Exit 0 16K
a6190ecabe37 base:latest /bin/bash 31 hours ago Exit 0 4K (virtual 4K)
1650aa02482b base:latest /bin/bash 31 hours ago Exit 0 4K (virtual 4K)
c65e9a2ea3c0 base:latest /bin/bash 31 hours ago Exit 0 4K (virtual 4K)
a3f224ff5229 base:latest /bin/bash 32 hours ago Exit 0 16K
9ab960de2f8a base:latest /bin/bash 32 hours ago Exit 0 16K
bb8f8d1b2ea0 base:latest /bin/bash 4 days ago Exit -127 16K (virtual 4K)
2d358ce51d87 base:latest /bin/bash 4 days ago Exit 0 16K
a13f4ba6204a base:latest /bin/bash 4 days ago Exit 0 16K
59bd80f6f359 base:latest /bin/bash 4 days ago Exit 0 16K
65559fd8e242 base:latest -i -t /bin/bash 4 days ago Exit 127 16K
a18f1dfef7ca base:latest /bin/sh -c while tru 4 days ago Up 1 seconds 16K (virtual 171M)

## images

display size of current layer, and parent's layers as virtual

./bin/docker images
REPOSITORY TAG ID CREATED SIZE
dhrp/sshd latest 1bd442970c79 2 weeks ago 20K (virtual 284M)
base ubuntu-quantal b750fe79269d 3 weeks ago 24K (virtual 171M)
base ubuntu-12.10 b750fe79269d 3 weeks ago 24K (virtual 171M)
base ubuntu-quantl b750fe79269d 3 weeks ago 24K (virtual 171M)
base latest b750fe79269d 3 weeks ago 24K (virtual 171M)
fa594d99163a 2 weeks ago