Docker rmi unable to remove images
As the comments on your question indicate, you have figured out that you need to use:
docker rmi
to remove imagesdocker rm
to remove containers
for a bit more background: there is a difference between:
- A docker image,
- A running container based off that image and
- A stopped container based off that image
The stopped container is kept because running the container might have changed the file system in the container, you can then commit this stopped container to have a new image. (that's one way to create images, manually run the commands and commit the resulting container).
Creating images using docker build and Dockerfile, does the same thing, it runs the container executing the Dockerfile commands and commits the resulting images, only tagging the last image that was committed.