Is your feature request related to a problem? Please describe.
I have three use cases I want to use Watchtower for:
✅ Auto pull and notify only
I use this for mission critical containers, so I can do controlled updates (eg. Pihole, Home Assistant, etc)
This is the smallest group of the three
✅ Auto pull, update containers, and notify
I use this for all other containers, as I don't mind taking the risk of auto-updating, but want the old image there in case I need to quickly rollback (eg. Immich, Forgejo, etc)
This would be a moderately sized group, if I had the below option
❌ Auto pull, update containers, cleanup old images, and notify
I want to use this for containers I don't really care about even having to rollback to the older version, I'll just forward fix the problem when I can, as they're not terribly important (eg. Calibre, Piped, etc)
Of my appx 30 docker hosts, this group would represent the vast majority of containers, meaning less administrative overhead
Describe the solution you'd like
I'm asking for consideration of a container-level cleanup option, using a boolean label such as com.centurylinklabs.watchtower.cleanup
Describe alternatives you've considered
Scripted cleanup of specific containers' older images, but that isn't terribly compatible with my how I manage my docker fleet (appx 30 hosts) using Portainer.
Ideally, I'd comb my Slack messages each weekend (Watchtower updates are cron'd for the early hours of Saturday morning), test the auto-updated containers, and only have to cleanup the two smaller groups of images as I go.
Additional context
Understand this may not be possible with a major rewrite of part of Watchtower. I haven't looked at the code myself, but I'm assuming the reason the cleanup option is host-wide is because Watchtower uses a docker prune to achieve it.
If so, then what I'm asking for would require individual assessment at a container level to determine which older images should and shouldn't be removed.
Is your feature request related to a problem? Please describe.
I have three use cases I want to use Watchtower for:
✅ Auto pull and notify only
✅ Auto pull, update containers, and notify
❌ Auto pull, update containers, cleanup old images, and notify
Describe the solution you'd like
I'm asking for consideration of a container-level cleanup option, using a boolean label such as
com.centurylinklabs.watchtower.cleanup
Describe alternatives you've considered
Scripted cleanup of specific containers' older images, but that isn't terribly compatible with my how I manage my docker fleet (appx 30 hosts) using Portainer.
Ideally, I'd comb my Slack messages each weekend (Watchtower updates are cron'd for the early hours of Saturday morning), test the auto-updated containers, and only have to cleanup the two smaller groups of images as I go.
Additional context
Understand this may not be possible with a major rewrite of part of Watchtower. I haven't looked at the code myself, but I'm assuming the reason the cleanup option is host-wide is because Watchtower uses a
docker prune
to achieve it.If so, then what I'm asking for would require individual assessment at a container level to determine which older images should and shouldn't be removed.