For research purposes I\'m trying to crawl the public Docker registry ( https://registry.hub.docker.com/ ) and find out 1) how many layers an average image has and 2) the si
It's indeed doable to query the manifest or blob info from docker registry server without pulling the image to local disk.
You can refer to the Registry v2 API to fetch the manifest of image.
GET /v2//manifests/
Note, you have to handle different manifest version. For v2 you can directly get the size of layer and digest of blob. For v1 manifest, you can HEAD the blob download url to get the actual layer size.
There is a simple script for handling above cases that will be continuously maintained.