Badgen.net: Add badge for docker image meta

Created on 29 Oct 2018  ·  9Comments  ·  Source: badgen/badgen.net

microbadger.com shows the size, number of layers, and version of a docker image.

image

It would be nice if badgen could support this service (I am not sure if an API is available).

https://images.microbadger.com/badges/image/node.svg
https://images.microbadger.com/badges/image/elasticsearch:2.3.1.svg
https://images.microbadger.com/badges/image/mhart/alpine-node:base-10.12.0.svg

More Live Badge pinned

Most helpful comment

Seems we can get layers info from official registry api
https://docs.docker.com/registry/spec/api/#pulling-an-image

While I hate to add another token 😾

All 9 comments

Indeed it's extremely slow 🤦‍♂️

Badgen's requests would timeout at 3 seconds (to make sure response for GitHub before it's timeout). We need to find a faster api for this, maybe official docker hub api or some other handy alternative. Or help them speed up this. A simple CDN cache would do the work.

I looked at the official docker hub api but it doesn't seem to aggregate the sum of the layers. You might be able to get each layer individually with several api calls and then perform the sum yourself.

That's basically what package phobia does for npm...but even npm isn't interested in adding this feature to their registry. So docker will likely avoid this too 😞

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Should we keep this issue open? I think the idea of image size as a badge is relevant, even if it doesn't come from microbadger service.

@styfle Sure

Seems we can get layers info from official registry api
https://docs.docker.com/registry/spec/api/#pulling-an-image

While I hate to add another token 😾

Support for the docker build status similar to shield.io would be useful as well
https://img.shields.io/docker/build/vuejs/ci

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tunnckoCore picture tunnckoCore  ·  3Comments

diomed picture diomed  ·  3Comments

wopian picture wopian  ·  3Comments

papb picture papb  ·  3Comments

styfle picture styfle  ·  3Comments