Hi I am new to docker ,
I have deleted an image locally using docker rmi container_id
but i also want to delete “already exists” also ?
i want to create a new image so i dont want to pull the existing one, and docker rmi is not deleting this
…so just run docker build -t myname/bosun like you normally would. Docker will move the tag to your new image without disturbing the old image or any containers based on it. docker images may show the old image with just an ID and <none>; you can clean up old images on a developer system with a command like
docker rmi $(docker images -q -f dangling=true)
Why? Having those intermediate layers around isn’t harmful, and if you do docker pull the image again, it’ll save you time by not having to download them again. If you docker rmi a top-level image, it will also delete any lower-level layers that aren’t used by other images.