I am trying to delete a docker container by this command:
docker rmi
Obviously, I have replaced the Image-Id by the Id I get u
Docker containers run on top of docker images, you can delete an image only if it is not attached to any container.! So you have to stop container and remove container then you can remove image id.
docker stop container-id and docker rm container-id
Then try removing image docker rmi image-id
Some extra info given in below link. Cheers.!
https://docs.docker.com/config/pruning/