Implementing the Docker Registry HTTP API v2 spec

682 views
Skip to first unread message

Pubudu Fernando

unread,
Jun 1, 2016, 1:47:05 PM6/1/16
to docker-dev
Hi,

I'm trying to implement the Docker Registry API spec as a part of my ongoing Google Summer of Code project. For that, I'm using Jersey, with stub code generated from Swagger Codegen tool. The work I have done so far is available at [1]. I have implemented some of the endpoints (endpoints and methods to retrieve content). And I tested it using a REST client (Postman) and cURL and it worked as expected. However, when I tried to use the Docker Engine on my computer to interact with my Registry implementation, the following error was returned by the Docker Engine: "Error response from daemon: missing signature key" 

A check at the logs gave the following: 

ජූනි 01 20:44:11 DoNkEy docker[675]: time="2016-06-01T20:44:11.315170141+05:30" level=warning msg="Error getting v2 registry: Get https://127.0.0.1:8080/v2/: tls: oversized record received with length 20527"
ජූනි 01 20:44:11 DoNkEy docker[675]: time="2016-06-01T20:44:11.328121164+05:30" level=error msg="Handler for POST /v1.22/images/create returned error: missing signature key"
ජූනි 01 20:46:27 DoNkEy docker[675]: time="2016-06-01T20:46:27.841516648+05:30" level=warning msg="Error getting v2 registry: Get https://127.0.0.1:8080/v2/: tls: oversized record received with length 20527"
ජූනි 01 20:46:27 DoNkEy docker[675]: time="2016-06-01T20:46:27.852171354+05:30" level=error msg="Handler for POST /v1.22/images/create returned error: missing signature key"

I am using Ubuntu 15.10 and Docker version 1.10.2. My Registry is set to be used as an insecure Registry. 

The command I tested was the following: docker pull 127.0.0.1:8080/hello-world:latest 

A look at the network packets using Wireshark seem to indicate that the interaction with the Registry happens correctly, and the manifest is returned to the Docker Engine. But there seem to be an initial 400 response from my server (check the attached image) about an illegal character. What is this about? This doesn't come up when I use a REST client or cURL. 

What am I missing, which causes this issue? Would appreciate it if anyone can point me in the correct direction. Thanks

Screenshot from 2016-06-01 23-06-14.png
Reply all
Reply to author
Forward
0 new messages