Official-images: Is there a place to get image pull statistic from?

Created on 15 Feb 2016  路  10Comments  路  Source: docker-library/official-images

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.

Most helpful comment

All 10 comments

Thanks

@bboreham, how about for official images? I was hoping this would work:

https://hub.docker.com/v2/repositories/_/kaazing-gateway/

for

https://hub.docker.com/_/kaazing-gateway/

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/

image

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:

https://github.com/vegasbrianc/docker-pulls/blob/880fe4c9c59eda5e88a01856b609085d3b3bcd39/docker-compose.yml

here is an example that worked for me:

image

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/

Was this page helpful?
0 / 5 - 0 ratings