Docker Community Forums

Share and learn in the Docker community.

Cloud registry API v2 problems

dockercloud
dockerhub

(Awardsolutionsuser) #1

I’m getting inconsistent results when using could repo API v2.

the following curl works correctly:
curl -s -H ‘Authorization: JWT myAPI token’ 'https://hub.docker.com/v2/repositories/awardsolutionsuser/?page_size=100’
returns expected json struct as expected.

the following curl for GET /v2/name/manifests/32 always returns 404 even though I can see tag 32 in the repo via docker cloud repo GUI. image_example is the correct cloud repo:

curl -s -H ‘Authorization: JWT myapitoken’ -v -L https://hub.docker.com/v2/image_example/manifests/32

Trying 54.209.25.207…
Connected to (54.209.25.207) port 443 (#0)
found 149 certificates in /etc/ssl/certs/ca-certificates.crt
found 601 certificates in /etc/ssl/certs
ALPN, offering http/1.1
SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
server certificate verification OK
server certificate status verification SKIPPED
common name: .docker.com (matched)
server certificate expiration date OK
server certificate activation date OK
certificate public key: RSA
certificate version: #3
subject: CN=
.docker.com
start date: Fri, 11 Aug 2017 00:00:00 GMT
expire date: Tue, 11 Sep 2018 12:00:00 GMT
issuer: C=US,O=Amazon,OU=Server CA 1B,CN=Amazon
compression: NULL
ALPN, server did not agree to a protocol
GET /v2/image_example/manifests/32 HTTP/1.1
Host:
User-Agent: curl/7.47.0
Accept: /
Authorization: JWT myapitoken

< HTTP/1.1 404 Not Found
< Date: Sat, 03 Mar 2018 23:22:19 GMT
< Content-Type: text/html
< Content-Length: 162
< Server: nginx
< X-Frame-Options: deny
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Strict-Transport-Security: max-age=31536000
<

404 Not Found
404 Not Found
nginx * Connection #0

I also tried HEAD verb, tried forcing http1.1 with curl, and of course read v2 API docs. I am using the same token with both curls. Any idea as to how to get manifests API working?

thanks for help.

Rod


(Gergnz) #2

awardsolutionsuser Did you ever find a solution to this?