Configuration for automatic pruning of container images

Problem/Justification
Over the months application updates accumulated quite a lot of container images (/ui/apps/manage-container-images) that sum up to hundreds of GBs of container images causing the pool to slowly run out of space. It took my quite a while to understand what was going on and that I could manually delete old container images. While it is a great feature to be able to roll back applications, I would not expect this feature to accumulate all images over time. I would expect that e.g. the last X versions of a container get stored or outdated containers get deleted after a configurable periode of time e.g. X days.

Impact
The amount of space used for old container versions will be limited. Users might not be able to roll back to very old version or need to download the container images again when doing so.

User Story
/ui/apps/installed/community/arti will get additional settings to configure automatic pruning of conatiner images (keep last X / delete unsued after X days)
/ui/apps/manage-container-images will get an additional button to prune outdated images

3 Likes

+1

Just want to chime in and say it has caused me some troubles with my applications. More info here. I didn’t even know it accumulates endlessly and it filled up my apps pool completely…

2 Likes

Until a gui solution is available you could set up a conjob that periodically prunes all unused images…

sudo docker image prune -a

in a cronjob running on whatever schedule you want

3 Likes

Total reclaimed space: 462.2GB

wow… why aren’t these automatically pruned?

1 Like

I am using a daily cronjob for now with the following command:

docker image prune -f --all --filter "until=48h"