Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker pull/push not working with insecure registry

I installed docker toolbox and I am trying to connect to my private registry.

I added the following to /var/lib/boot2docker/profile

 EXTRA_ARGS='
--label provider=virtualbox --insecure-registry http://myregistry.com:80

'

I am able to login to the registry successfully. But when I try to pull/push from/to the registry, I get the following error.

Error response from daemon: unable to ping registry endpoint
https://myregistry.com:80/v0/ v2 ping attempt failed with error: Get
https://myregistry.com:80/v2/: tls: oversized record received with
length 20527  v1 ping attempt failed with error: Get
https://myregistry.com:80/v1/_ping: tls: oversized record received
with length 20527

Any help would be appreciated. Thanks

like image 928
Shriram Sharma Avatar asked Sep 27 '22 07:09

Shriram Sharma


2 Answers

I was able to resolve the issue.

instead of

--insecure-registry http://myregistry.com:80

I did

--insecure-registry=myregistry.com

and it worked

like image 123
Shriram Sharma Avatar answered Sep 30 '22 07:09

Shriram Sharma


The main way to debug, as in issue 958, is to run the daemon docker in debug:

docker -D -d

In your case, the v2 registry was not able to be contacted and then attempted v1, giving the error you see.
The logs should tell you more.

Make sure you have followed Deploying a plain HTTP registry.

like image 23
VonC Avatar answered Sep 30 '22 07:09

VonC