When remove an image, error:

docker image is being used by stopped container 93cf27757d2d

Reason: the image to be deleted is being used by a container. This container might not be running.

docker ps,or docker container ls: might show nothing, because this container is not running.

docker ps -a: ✅ ls all containers, including which are not running.

It shows that a container with ID 93cf27757d2d is using this image.

docker rm 93cf27757d2d to remove this container. 93cf27757d2d is its containerId.

Then docker rmi 76c7c66bff02 to remove this image. 76c7c66bff02 is ImageId.

1
2
Deleted: sha256:76c766bff021dbe2ff1c974bce60f490bb7978db6f3363b76
... (10+ lines like this)

shows the image is successfully deleted.

docker images to see this.