We have learned how to manage image containers throughout this chapter, so now, let's take a look at the most common image administration tasks.
Dangling images can be a nightmare if you do not take care of them from the very beginning. As we mentioned in the previous sections, dangling images are images that aren't referenced and therefore, are not used by any other image. In fact, they are the result of continuous builds as Docker uses them for caching and improving build performance. They are just layers used during image builds that are no longer used because, in a particular step, we changed a package, we updated our code, we changed a configuration file, and so on, and, as a result, it is not necessary. We should delete these images since they can consume a significant amount of disk space.
Since version 1.13, Docker provides the Docker image prune action, which, by default, will remove all dangling images. However, we can choose...