Skip to content
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

Inconsistent Size in image JSON #5968

Closed
titanous opened this issue May 21, 2014 · 4 comments
Closed

Inconsistent Size in image JSON #5968

titanous opened this issue May 21, 2014 · 4 comments

Comments

@titanous
Copy link
Contributor

Size is capitalized and always 0, but there is an x-docker-size header that is set.

$ curl -vsH "Accept: application/json" -H "Authorization: Token signature=004020737ace8079d2c73bbed856c84e2df100de,repository="flynn/slugbuilder",access=read" https://cdn-registry-1.docker.io/v1/images/4a24a8c25c277462c7b7b7899c08875515ab0123333a822006ca232e7ab9da22/json | jq .
...
< HTTP/1.1 200 OK
< Server: cloudflare-nginx
< Date: Wed, 21 May 2014 17:15:43 GMT
< Content-Type: application/json
< Content-Length: 1507
< Connection: keep-alive
< Set-Cookie: __cfduid=daba9bb08762bf11d5b4b467c1e11c32d1400692542999; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.docker.io; HttpOnly
< x-docker-checksum: sha256:47acabf396837d9960a32245b965d33f59620c269edbd6abf160123e5d5ad61b
< expires: Thu, 21 May 2015 17:15:43 GMT
< last-modified: Thu, 01 Jan 1970 00:00:00 GMT
< pragma: no-cache
< cache-control: public, max-age=31536000
< x-docker-size: 180
< x-docker-registry-version: 0.6.7
< x-docker-registry-config: prod
< CF-RAY: 12e26ae9b9e307d3-MIA

{
  "Size": 0,
  "os": "linux",
  "architecture": "amd64",
  "id": "4a24a8c25c277462c7b7b7899c08875515ab0123333a822006ca232e7ab9da22",
  "parent": "50b6a1e88daa593314f3369f1fd50f4cec9f8cc7bd709b5c5773579ed3f2b44d",
  "created": "2014-05-12T19:56:01.984015884Z",
  "container": "b4bc7059061c4becfb9fc37571d22f970a780f462a8cb16f50c564e049dba9bb",
  "container_config": {
...
@jessfraz
Copy link
Contributor

@stevvooe is this fixed in registry v2 api
re: #9015

@stevvooe
Copy link
Contributor

@jfrazelle Yes. The size is reported for all api responses as Content-Length, avoiding inconsistencies. This can be retrieved with HEAD request to the layer resource if its required before downloading.

We are also discussing the details of size reporting for manifest dependencies in distribution/distribution#62, which I believe @titanous is familiar with.

@jessfraz
Copy link
Contributor

so can I close this as a dupe of #9105?
if its ok w @titanous

@titanous
Copy link
Contributor Author

SGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants