Quite often we have new build failing because we run out of space (for example see https://pagure.io/fedora-infrastructure/issue/8146).
We need a cronjob to do some cleaning base on the date of the image. We could keep all the build images that are less than 1 month old for example
Metadata Update from @cverna: - Issue assigned to cverna
Note that the two commands I used for this are in root history on all the nodes. Basically a docker image list and then a docker rmi shouldn't be too hard to script.
Metadata Update from @kevin: - Issue priority set to: Waiting on Assignee (was: Needs Review)
Yes I saw that :-), we could also use docker to cleanup all the "dangling" images (ie images that are not currently used by the docker daemon. But I am not sure how that would impact the possibility to rollback to a previous image. I believe that each image successfully built is pushed to the internal registry so cleaning up images on each node should be fine.
@kevin what do you think about it ?
The command to remove dangling images is docker rmi $(docker images --filter dangling=true -q).
docker rmi $(docker images --filter dangling=true -q)
Sure. +1 to give it a try...
Metadata Update from @cverna: - Issue tagged with: backlog
Following commit pushed --> https://infrastructure.fedoraproject.org/cgit/ansible.git/commit/?id=2ea99bd
I ll close this and will check next week if the cron did his job :smile:
Metadata Update from @cverna: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.