Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REQUEST: label to cleanup images by container #1965

Open
DeltaTangoLima opened this issue Apr 20, 2024 · 0 comments
Open

REQUEST: label to cleanup images by container #1965

DeltaTangoLima opened this issue Apr 20, 2024 · 0 comments

Comments

@DeltaTangoLima
Copy link

DeltaTangoLima commented Apr 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant