Occasionally clean-up Gitlab CI storage
Today it looks like we ran out of disk space on the CI runner. See this tpo/core/arti build from @asn: https://gitlab.torproject.org/asn/arti/-/jobs/11272
I think the one-shot solution is to run
docker system prune -a, but this only solve the problem here and now, and not next time we run into it.
Since Gitlab CI themselves seems to use docker+machine, I think that is less of an issue for them, but others are reporting similar issues and many possible solutions seems suggested in their ticket trackers.
There is a cron job script here: https://gitlab.com/snippets/1729438 which looks at modified time of the images instead of just wiping everything.
Some better solutions seems suggested in here: https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/2310 and it sounds like this is being merged for the next release.