In this section, I will present a few very useful tips and tricks that make the lives of advanced Docker users so much easier. We will start with some guidance on how to keep your Docker environment clean.
All of the tips and tricks of a Docker pro
Keeping your Docker environment clean
First, we want to learn how we can delete dangling images. According to Docker, dangling images are layers that have no relationship to any tagged images. Such image layers are certainly useless to us and can quickly fill up our disk—it's better to remove them from time to time. Here is the command:
$ docker image prune -f
Please note that I have added the -f parameter to the prune command. This is to prevent the CLI...