docker image history

Estimated reading time: 3 minutes

Description

Show the history of an image

Usage

docker image history [OPTIONS] IMAGE

Options

Name, shorthand Default Description
--human, -H true Print sizes and dates in human readable format
--no-trunc false Don’t truncate output
--quiet, -q false Only show numeric IDs

Parent command

Command Description
docker image Manage images
Command Description
docker image build Build an image from a Dockerfile
docker image history Show the history of an image
docker image import Import the contents from a tarball to create a filesystem image
docker image inspect Display detailed information on one or more images
docker image load Load an image from a tar archive or STDIN
docker image ls List images
docker image prune Remove unused images
docker image pull Pull an image or a repository from a registry
docker image push Push an image or a repository to a registry
docker image rm Remove one or more images
docker image save Save one or more images to a tar archive (streamed to STDOUT by default)
docker image tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

Extended description

Show the history of when and how an image was created.

EXAMPLES

$ docker history fedora
IMAGE          CREATED          CREATED BY                                      SIZE                COMMENT
105182bb5e8b   5 days ago       /bin/sh -c #(nop) ADD file:71356d2ad59aa3119d   372.7 MB
73bd853d2ea5   13 days ago      /bin/sh -c #(nop) MAINTAINER Lokesh Mandvekar   0 B
511136ea3c5a   10 months ago                                                    0 B                 Imported from -

Display comments in the image history

The docker commit command has a -m flag for adding comments to the image. These comments will be displayed in the image history.

$ sudo docker history docker:scm
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
2ac9d1098bf1        3 months ago        /bin/bash                                       241.4 MB            Added Apache to Fedora base image
88b42ffd1f7c        5 months ago        /bin/sh -c #(nop) ADD file:1fd8d7f9f6557cafc7   373.7 MB            
c69cab00d6ef        5 months ago        /bin/sh -c #(nop) MAINTAINER Lokesh Mandvekar   0 B                 
511136ea3c5a        19 months ago                                                       0 B                 Imported from -

Examples

$ docker history fedora

IMAGE          CREATED          CREATED BY                                      SIZE                COMMENT
105182bb5e8b   5 days ago       /bin/sh -c #(nop) ADD file:71356d2ad59aa3119d   372.7 MB
73bd853d2ea5   13 days ago      /bin/sh -c #(nop) MAINTAINER Lokesh Mandvekar   0 B
511136ea3c5a   10 months ago                                                    0 B                 Imported from -

Display comments in the image history

The docker commit command has a -m flag for adding comments to the image. These comments will be displayed in the image history.

$ sudo docker history docker:scm

IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
2ac9d1098bf1        3 months ago        /bin/bash                                       241.4 MB            Added Apache to Fedora base image
88b42ffd1f7c        5 months ago        /bin/sh -c #(nop) ADD file:1fd8d7f9f6557cafc7   373.7 MB            
c69cab00d6ef        5 months ago        /bin/sh -c #(nop) MAINTAINER Lokesh Mandvekar   0 B                 
511136ea3c5a        19 months ago                                                       0 B                 Imported from -
chat icon Feedback? Suggestions? Can't find something in the docs?
Edit this page Request docs changes Get support
Rate this page: