Docker and CI/CD · Junior · Question 29 of 75
What is the difference between docker rm and docker rmi?
- ✓Correct answer:
rmremoves containers;rmiremoves images - 2
rmiremoves containers only from the registry - 3
rmremoves running containers;rmiremoves stopped ones
Explanation
An image can't be removed while a container (even a stopped one) uses it. docker system prune cleans unused containers, networks, images and build cache.