I was trying various options of "docker image history"
command to see the image layers used to build the image on my local machine.
There is a nginx image on my system which has no tags assigned. So "docker images"
command lists the following images in my system.
I tried to find layer details for nginx image using following command :
docker image history nginx
But as the tag name is not specified, docker-cli considers it default "latest" tag which is not present on my system and I am getting following error :
Error response from daemon: No such image: nginx:latest
I tried the same command with "none" as tag but it also failed with following error :
docker image history nginx:none
Error response from daemon: No such image: nginx:none
Any suggestions ? How can we see layers of an images which does not have tag assigned.
3
Answers
I found
--filter
option fordocker images
command which we can use to find dangling/untagged images as below :We can use this command to list image layers for the untagged image as below :
Try using ID instead of name with tag.
Let say that I have this output of
docker images
I can use
docker image history
and specify the ID or part of it sufficient to identify the image in this context.In your case it is as follows: