What does `docker history` show and how do you see layer sizes?
BeginnerConceptImages, Layers & Storage Drivers
Answer
It lists each layer's creating instruction, size and age. Use --no-trunc for full commands and --format for custom output. Tools like dive allow interactive layer browsing and wasted-space estimates.
docker history --no-trunc --format '{{.Size}}\t{{.CreatedBy}}' app:1.0
More on Images, Layers & Storage Drivers
What is a Docker image made of?BeginnerWhat is a layer and when is one created?BeginnerWhat is a union filesystem / OverlayFS?IntermediateWhat is copy-on-write (CoW) in containers?IntermediateWhy does deleting a file in a later `RUN` not shrink the image?IntermediateWhat storage drivers does Docker support and which is default?Intermediate