-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ImageLayers.io Docker Hub layer information service #538
Conversation
👍 |
method: 'POST', | ||
json: { | ||
"repos": [{"name": path, "tag": tag}] | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe, from request's documentation, that the json
entry is meant to either be falsy or true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, my bad. I see now that this should be in the body per docs:
body - entity body for PATCH, POST and PUT requests. Must be a Buffer or String, unless json is true. If json is true, then body must be a JSON-serializable object.
Thanks for your contribution! I cannot get it to work, however. I am not sure what |
Sure, I was using something like:
You can remove the `| jq '.[].repo' part if you don't have jq installed. |
Thanks! I have two queries.
|
I guess we could have image size and layers as two separate badges. In this case, should the prefix just be image-size and layers respectively? |
That sounds good! |
Updated to separate into two types |
@@ -0,0 +1 @@ | |||
phantomjs_cdnurl=http://cnpmjs.org/downloads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you detail the purpose of this line?
Thanks! Apart from those tangential issues, it seems all good. |
Sorry, those shouldn't have been in the commit. Side note... the PhantomJS npm install doesn't work for me on the default mirror. Could be local issue though. |
Ah, damned. It it a pinned version on package.json; I'm not sure what is wrong there. I should try to update the project to a newer version of node. Maybe all our worries will evaporate. |
Thanks a lot! I just noticed that the badge says |
My JavaScript wasn't up to snuff to elegantly solve that and it didn't bother me enough :) |
This adds a ImageLayers.io badge (which resembles the same data in their own badge). I wanted to use their badge. But it didn't conform to the look of all the other ones I was already using from shields.io.
This also adds a small
filesize
package. It was a quick way to do humanized file sizes. If this undesirable, I can try and rework it without.