-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
Description
Description
Having just started using watch
to rebuild a Go application on code changes, I'm quite happy! It's a solid feature that means I no longer need to rely on other tools to watch for file changes.
I've done some searching around but haven't found any discussion on tidying up dangling images after the numerous if not hundreds of rebuilds that could occur throughout the day.
Adding a --prune
option to the command that does this automatically would be a nice next addition.
At present you only have the following options (as far as I'm aware):
- Run
docker system prune
manually once in a while. - Set up a cronjob to run the above command to remove the manual element.
- Or a little more programatic would be to pipe the output of
docker system events
to another process, pulling out the label forcom.docker.compose.service
and providing that as a filter to the prune command.
All are undesirable, you might not want this running all the time on a schedule and anything manual is going against the point of having a watcher in the first instance to build / sync.
danielbenzie, SystematicCZ, julianfann, joaomcarlos, nivpenso and 10 more