aanno (8) [Avatar] Offline
#1
Suggestion: In 2.1.8, add a few words about 'virtual size':

* What does it mean?
* How is the size related to the image layers?
* Where are the layers actually stored by docker?
Marko Lukša (67) [Avatar] Offline
#2
Hi,

I'm afraid it's a bit late to add text to the book at this stage, but I'll make a note to add this info to the 2nd edition of the book, if there ever is one.

But here are the answers to your questions:
* What does it mean?
* How is the size related to the image layers?

it's the total size of the image (sum of the sizes of all the layers). If you don't have any of those layers stored locally, then that's the amount of data that would need to be downloaded. Of course, if you have two tags pointing to the same image id and each one shows 500MB, they are only taking up 500MB of disk storage (instead of 1000MB).

* Where are the layers actually stored by docker?

Depends on what storage driver Docker is configured to use. If using the devicemapper driver, they are under /var/lib/docker/devicemapper; if using overlayfs, they are under /var/lib/docker/overlay2