Problem description
I am building a opensource project with CI/CD.
Every commit is builded and pushed to docker hub with the short commit number as their tag.
I wanted to find a way to cleanup old commit builds but keep a few (i.e. last 15 days and at least 3).
i.e.
a little tool that would take a few argument:
- repository to run against
- regex match for tags
- days to keep
- minimum number of tags to keep
I looked at registry api against registry-1.docker.io. And i am able to list tags with details without any issues.
Delete manifests is apparently supported there.
doing a delete on https://registry-1.docker.io/v2/{repo}/maniftests/{digest} responds with:
{"errors":[{"code":"UNSUPPORTED","message":"The operation is unsupported."}]}
From my reading of it, it seems that delete has not been disabled on the backend registry.
Problem description
I am building a opensource project with CI/CD.
Every commit is builded and pushed to docker hub with the short commit number as their tag.
I wanted to find a way to cleanup old commit builds but keep a few (i.e. last 15 days and at least 3).
i.e.
a little tool that would take a few argument:
I looked at registry api against
registry-1.docker.io. And i am able to list tags with details without any issues.Delete manifests is apparently supported there.
doing a delete on
https://registry-1.docker.io/v2/{repo}/maniftests/{digest}responds with:{"errors":[{"code":"UNSUPPORTED","message":"The operation is unsupported."}]}From my reading of it, it seems that delete has not been disabled on the backend registry.