How to delete a Docker image without a tag?

I have been using docker since 5 months, and I have never had this problem. I have 2 images with the same identifier, so I want to delete the one I know that it is out of date. The fact is that it does not have an identifier, and when I try to do

 dk rmi -f gitlab-lab:5005/xs/mgmt-docker-gui

There was an error:

Error response from daemon: No such image: gitlab-lab:5005/xs/mgmt-docker-gui:latest

So, how can I delete this one and not another one that has the same ID?

jerome/mgmt-docker-ui                latest              537b5ea5aa7b        4 days ago          476 MB
gitlab-lab:5005/xs/mgmt-docker-gui   <none>              537b5ea5aa7b        4 days ago          476 MB
+4
source share
1 answer

I believe that you mean an image with a tag <none>. If so, you can delete using the switch dangling.

docker rmi $(docker images -f dangling=true -q)
+7
source

Source: https://habr.com/ru/post/1672216/


All Articles