Unable to delete docker image, response from daemon

I am new to ubuntu, so maybe something simple that I am missing. I am trying to delete my docker images using

sudo docker rmi <IMAGE ID>

I get an error

Error response from daemon: No such Id: 265fdadf...

If i try

sudo docker ps -a | grep <Image ID>

It does not return any results.

I am not sure what this error answer means and why I cannot delete the image. ID 265 is different from the actual IMAGE ID of my docker image.

+1
source share
2 answers

You mix containers with images. When you are done docker ps, you ask the docker to display the running containers. When you do docker rmi, you ask the docker to delete the images. To view the images, do docker images [-a].

+1

( ) , Docker , . docker ps -a .

, :

sudo docker ps -a -q --filter "status=exited" | xargs sudo docker rm
sudo docker rmi `sudo docker images -q --filter "dangling=true"`
+1

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


All Articles