docker image history
Shows the layers of an image, newest first, with the instruction that created each one and its size.
In more detail
Instructions that only set metadata, such as CMD, show a size of 0 B. History helps you find which step made an image large, but it is not a security audit: a file deleted in a later layer still exists in an earlier one.
Example
docker image history layers:demoRelated terms
- layer — One read-only slice of an image that records the files a single build step added, changed or deleted.
- Dockerfile — A text file of instructions, such as FROM, COPY and RUN, that tells Docker how to build an image.
- whiteout file — A marker in a higher layer that says a file from a lower layer has been deleted.
Taught in
- Union Filesystems, Images And Writable Layers — Docker Architecture & Production Containers
- Pull And Inspect A Third Party Image — Docker Architecture & Production Containers
- RUN, SHELL And Efficient Layer Caching — Docker Architecture & Production Containers
- ARG, ENV, LABEL, EXPOSE And VOLUME — Docker Architecture & Production Containers
- Multi Stage Builds, Targets And Build Secrets — Docker Architecture & Production Containers
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers