Docker image with tag <none>

Hi
I would like to know how can I remove the the container with labels? Although it is saying that I can remove by force, I want to be sure that it doesn’t harm the system by wrongly deleting other dependent files. How can I check the source of conflict?

$ docker images
REPOSITORY            TAG                        IMAGE ID       CREATED         SIZE
<none>                <none>                     523ceb2a900a   7 minutes ago   5.13GB
nvcr.io/nvidia/cuda   11.6.0-devel-ubuntu20.04   44b919ab35af   3 weeks ago     5.09GB
$ docker rmi 523ceb2a900a
Error response from daemon: conflict: unable to delete 523ceb2a900a (must be forced) - image is being used by stopped container 5e2322a53cf9

Hello,

If you remove a single image with docker image rm <image id> or remove all dangling images with docker image prune it is ensured that no images currently used by containers are deleted (as shown by your snippet).

To check which container is still using this image you can display all running and stopped containers with docker ps -a. Now you can remove stopped containers which are not needed anymore either with docker container rm <containername|containerid> or remove all stopped containers with docker container prune

1 Like