I have watchtower to keep my 50 production docker containers up to date. So far I have never had to resort to an old image since the new one was bugged but I know of the risks and dont have the --cleanup
flag activated so I could easily spin up the old image if necessary. I also keep daily (mirrored) backups so I should be ok in the case of failure.
But I keep running into space issues due to multiple GBs of old images that I have to manually remove to not fill up the rather small ssd.
Does anyone have an idea how to automatically remove all but the newest unused docker image so I can quickly revert to it in case of failure but once there is another unused one of this container it goes away?
It’s probably no big deal but searching for it together with watchtower didnt yield anything so far.
Thanks in advance and have a good one.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.
Rules:
Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.
No spam posting.
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.
Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Not exactly what you’re asking but you can push specific images to a private repo to keep specific versions… Then you can just use the cleanup tag or prune to clear them off the system and if you want to pull them again it won’t need to download it from the internet
Hmmmm… thats pretty cool. Thanks for the suggestion.