Short tip for people like me experimenting with Docker: Cleaning up after you can be time-consuming and annoying. This also applies to keeping 3rd party images up-to-date. Luckily there’s Spotify’s docker-gc for housekeeping which - although very basic - does the job exceptional well. Just create one file with containing the names or IDs of all images you want to keep and one file with all the container names or IDs you want to keep and run
docker-gc afterwards. Thereafter you can simply do a
docker pull on the remaining images.
Here’s how I do the whole process, first cleaning up, afterwards refreshing the images which remain. As I do not conserve any containers, there is no EXCLUDE_CONTAINERS_FROM_GC: