Vic Seedoubleyew
Vic Seedoubleyew

Reputation: 10556

How to list docker images with their creation date

I would like to list all Docker images on my machine, along with their creation date. Kind of the equivalent of the shell's ls -l.

How to do that?

Upvotes: 5

Views: 2535

Answers (1)

Vic Seedoubleyew
Vic Seedoubleyew

Reputation: 10556

You can use the --format option of the docker image ls command:

docker image ls --format "{{.ID}}: {{.CreatedAt}}"

You can also use .CreatedSince instead of .CreatedAt for relative times.

You can also print repository, tag, digest and size in the same way: https://docs.docker.com/engine/reference/commandline/images/#format-the-output

Upvotes: 5

Related Questions