Preferably listed via an API call (rationale below), although on the versions page (maybe behind an “show untagged images” button or something) would be nice.
Can’t hurt, but I’d be more interested in the timestamp of when the image was pushed.
What I’m thinking of is cleaning up images that aren’t needed after a while, e.g.:
- Nightly (or even per-commit) builds that could be used for integration testing, or development on related projects.
- Build environments: I’d like to prepare environments for use that with the Actions
jobs.<job_id>.container keyword so dependencies don’t have to be installed during every build. That takes about 2 min each time, per distro tested in a matrix build (well, except Alpine which needs just a few seconds). To get updates of the underlying distro and dependencies I’d want to rebuild those environments frequently, e.g. during the first CI build of the day.
The latter would accumulate in the order of gigabytes pretty quickly, and would hardly be useful for anyone else in old versions, so I’d like to clean up after myself. Basically a sort of
docker image prune.
As long as packages storage is free for open source projects it would not hurt me to leave them around, but for people with private images it could quickly become a billing issue. And evidently it became an issue for Docker Hub, too, given their recent announcement to delete unused images on free accounts after 6 months (that’d do the trick for me, too, but maybe not for people who need to pay for storage). That post also says:
In addition, Docker will also be providing tooling, in the form of a UI and APIs, that will allow users to more easily manage their images.
I haven’t seen any specifics on that yet, but to me it sound like “tools to help you clean up”, so a compatible API on GHCR might be a thing to consider.