Not sure if this is the right place to ask. I would like to be able to get image pull statistics, preferably via an API. For example, on docker hub I can see the number of pulls here.
Additionally, if possible I would like to be able to correlate the downloads to other events, tweets, conferences, etc. I.e. get the statistics at specific dates/over time.
Thanks
@bboreham, how about for official images? I was hoping this would work:
https://hub.docker.com/v2/repositories/_/kaazing-gateway/
for
Give https://hub.docker.com/v2/repositories/library/kaazing-gateway/ a try :+1:
Thanks Again
Not sure if I should necro-post in a closed issue, but is there a way to retrieve historical data for stars and pulls by month?
Is there a way to get the statistics by tag. something like https://hub.docker.com/v2/repositories/kaazing/gateway/5.4.1
@otravers and @rsamban, no api endpoint that I know of. I'm not even sure that they store those data points. You could generate at least the pullls and stars by month with a small transformation script to periodically scrape the Docker Hub and store it in a metrics database.
I found a way as @yosifkit describes to poll the API and keep track of the history yourself:
https://www.brianchristner.io/how-to-track-docker-hub-metrics/

note that some of the APIs have changed since the dashboard was created, eg
docker_hub_pulls_total{image="ubuntu"} to
docker_hub_image_pulls_total{image="ubuntu",user="library"}
Also, if you had to putz around like I did to figure out what datasource you need for the dashboard, given the docker-compose file in this repo:
here is an example that worked for me:

However, I'd still like to find a way to view the time trends of such metrics, rather than having to record them manually myself. Oh well...
How about tracking using Google Apps Script and Google Sheet? It's quick and doesn't need any installation. You can find more about that here https://www.gasimof.com/blog/track_docker_image_pulls/
Most helpful comment
https://hub.docker.com/v2/repositories/kaazing/gateway/