Shields: Consider using/switching from imagelayers.io to microbadger.com for Docker layers badges

Created on 17 Apr 2017  路  9Comments  路  Source: badges/shields

As of https://github.com/microscaling/imagelayers-graph/issues/94 / https://github.com/microscaling/imagelayers/issues/26, imagelayers.io is broken since many months (at least June 2016). It continue to works with existing images but new images can't be fetched (maybe due to a Docker API change).

The service https://microbadger.com/ seems to offer same informations as imagelayers.io, please consider propose it in addition/replacement.

bug service-badge

All 9 comments

Hi, thanks for bringing this up.

When testing #706 I encountered badges which surprisingly returned zero. I incorrectly assumed this was a problem with the package. For example:

In that backlog of PRs is #794, which is replaces the imagelayer badge with a dockerhub badge. That may be an alternative fix for this issue. Would you have some time to test that to see if it's working appropriately?

At first glance, there is a problem with the auth when requesting informations on public user image (although it works well with the ubuntu default example):

{ errors: 
   [ { code: 'UNAUTHORIZED',
       message: 'authentication required',
       detail: [Object] } ] }

I'll need to investigate more :)

Ok i've tested the wrong routes..., /docker/image/layers and /docker/image/size works as expected:

$ for route in docker/image/size docker/image/layers; do curl --include http://localhost:8080/$route/guidelacour/dnsenum/latest.svg; done
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate
Expires: Tue, 18 Apr 2017 22:38:13 GMT
Date: Tue, 18 Apr 2017 22:38:13 GMT
Content-Type: image/svg+xml;charset=utf-8
Connection: keep-alive
Transfer-Encoding: chunked

<svg xmlns="http://www.w3.org/2000/svg" width="110" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="a"><rect width="110" height="20" rx="3" fill="#fff"/></mask><g mask="url(#a)"><path fill="#555" d="M0 0h65v20H0z"/><path fill="#007ec6" d="M65 0h45v20H65z"/><path fill="url(#b)" d="M0 0h110v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"><text x="32.5" y="15" fill="#010101" fill-opacity=".3">image size</text><text x="32.5" y="14">image size</text><text x="86.5" y="15" fill="#010101" fill-opacity=".3">258MB</text><text x="86.5" y="14">258MB</text></g></svg>

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate
Expires: Tue, 18 Apr 2017 22:38:13 GMT
Date: Tue, 18 Apr 2017 22:38:13 GMT
Content-Type: image/svg+xml;charset=utf-8
Connection: keep-alive
Transfer-Encoding: chunked

<svg xmlns="http://www.w3.org/2000/svg" width="64" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="a"><rect width="64" height="20" rx="3" fill="#fff"/></mask><g mask="url(#a)"><path fill="#555" d="M0 0h41v20H0z"/><path fill="#007ec6" d="M41 0h23v20H41z"/><path fill="url(#b)" d="M0 0h64v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"><text x="20.5" y="15" fill="#010101" fill-opacity=".3">layers</text><text x="20.5" y="14">layers</text><text x="51.5" y="15" fill="#010101" fill-opacity=".3">11</text><text x="51.5" y="14">11</text></g></svg>

Hi!

ImageLayers seems useless for new Docker images and it looks like docker hub version isn't in the production version of Shields, doesn't it? So, adding the support of microbadger.com looks worth it.

Could someone tell me what can be used to get an image size of a Docker container now, for example, _/ubuntu/latest? If there is no way to do it, is there any ready pull requests for adding something for that?

I don't think anyone has started working on this, beyond the research above. Would you like to look into it a bit?

Here is the code that runs the imagelayers badge: https://github.com/badges/shields/blob/342e71ee655d9583836053a88f04a422239e0942/server.js#L6217-L6260

Of course no pressure if not!

@paulmelnikow According to the last opened issues in ImageLayers repository it looks dead. I can't even get the size of the image via the web interface or somehow else.

I'm trying to add the MicroBadger integration

Great! We can finish the convo here, if any questions come up along the way.

microbadger.com also not stable. Any alternatives?

As we have now implemented the MicroBadger alternative, I'm going to close this issue.

@delfer regarding stability, I'm assuming things have improved after I raised this issue on their upstream repository. Feel free to open a new issue if you are still facing problems. 馃槈

Was this page helpful?
0 / 5 - 0 ratings

Related issues

calebcartwright picture calebcartwright  路  37Comments

marceloboeira picture marceloboeira  路  35Comments

ducin picture ducin  路  51Comments

AlexWayfer picture AlexWayfer  路  40Comments

agemooij picture agemooij  路  27Comments