Interview Prep/Docker/Images, Layers & Storage Drivers

How are layers shared between images?

AdvancedConceptImages, Layers & Storage Drivers
Answer

Layers are identified by content digest (diff_id/blob digest). Two images with the same base layers store them once on disk and in the registry, and a pull downloads only missing blobs. That is why putting stable instructions (base, system packages, dependencies) before frequently changing ones (app code) saves bandwidth and disk.

All Docker questions Roadmap: Docker & containers

More on Images, Layers & Storage Drivers