[Docker CLI] docker history
docker history
Show the history of an image
Prerequisites
-
Docker
Docker is a tool to build safer, share wider, run faster: New updates to our product subscriptions.
See Empowering App Development for Developers | Docker - https://www.docker.com/
to learn more.
Usage
1 | docker history [OPTIONS] IMAGE |
For example uses of this command, refer to the examples section below.
Options
1 | Name, shorthand Default Description |
Examples
To see how the docker:latest image was built:
1 | docker history docker |
To see how the docker:apache image was added to a container’s base image:
1 | docker history docker:scm |
Format the output
The formatting option (--format
) will pretty-prints history output using a Go template.
Valid placeholders for the Go template are listed below:
1 | Placeholder Description |
When using the --format
option, the history command will either output the data exactly as the template declares or, when using the table directive, will include column headers as well.
The following example uses a template without headers and outputs the ID and CreatedSince entries separated by a colon (:
) for the busybox image:
1 | docker history --format "{{.ID}}: {{.CreatedSince}}" busybox |
References
[2] Empowering App Development for Developers | Docker - https://www.docker.com/