#1652·komodo

Image update checks use more quota than is needed

Author: pelluchCreated Sep 27, 2026Updated Sep 27, 2026

As per https://github.com/moghtech/komodo/blob/780ac68b992094a9fccd5fffb760e0c84fd3c3d1/bin/periphery/src/docker/image.rs#L195-L197

Update checks essentially use docker buildx imagetools inspect --format "{{json .Manifest}}". This actually resolves the entire manifest index, including all children it references - so instead of using one quota from whatever registry, I've seen it use 9 or more for some of my images.

In practice, that means that for instances that have a lot of containers, the registry's quota can get depleted with global update checks - and in my particular case, even with Komodo's caching, which avoids quota usage for repeated checks of the same image, I've seen it happen many times, particularly with docker hub, where even with a (free) account, you still have a quota of 200 (ghcr.io is a lot more forgiving for signed in accounts).

For docker hub, assuming one has a ~/.docker/config.json with some auth value for https://index.docker.io/v1/, quota can be verified with

bash
TOKEN=$(curl -s -H "Authorization: Basic $DOCKER_HUB_AUTH" "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
curl -sI -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest | grep -i ratelimit

As a concrete example, docker buildx imagetools inspect --format "{{json .Manifest}}" postgres:18.6 uses 9. Note that not all docker hub images even use quota, ones that are in the Verified Publisher program, like the grafana images, do not use any at all.

It turns out it's pretty easy to improve this.

docker buildx imagetools inspect --raw "$IMAGE" uses one only one API quota, and provides the raw manifest JSON. The manifest's digest is just the sha256 sum of this, so

bash
docker buildx imagetools inspect --format "{{json .Manifest}}" postgres:18.6

is identical to doing

bash
docker buildx imagetools inspect --raw postgres:18.6  | sha256sum

and prefixing it with sha256:. This uses a lot less quota - one would need a truly large amount of unique images to overrun it within an hour. The command's help text doesn't make this obvious at all, but it works consistently across my whole image set. The fact that the sha256sum of the manifest is the digest is guaranteed by the OCI image spec.

I did test some variants of the --format cmd line variant, but only raw seemed to provide the quota decrease.