Reputation: 4029
I have 50+ docker images existing locally. It's tough to manage them.
Hence, I only want to list last 5 images created i.e. modify the
docker images
command to be able to filter only latest 5 created images.
Upvotes: 0
Views: 686
Reputation: 3611
Can use this command:
docker images --format '{{.ID}} | {{.Repository}} | {{.Tag}} | {{.CreatedSince}} | {{.CreatedAt}} | {{.Size}}' | tail -5
.ID -- ImageID
.Repository -- Image repository
.CreatedSince -- Lapsed time since the image was created
.Size -- Image Size
.CreatedAt -- Time when the image was created
Upvotes: 0