Reputation: 4301
I've set up a private registry for docker, everything works greate from outside (i've a server with several VMs, one of these is the reposiotry).
From my pc I can do docker login -u USER -p PASS repo.mydomain.com
and it works great.
Now, from inside another VMs if i do the same i get back Error response from daemon: Get https://repo.mydomain.com/v1/users/: dial tcp 10.236.8.111:443: getsockopt: connection refused
It seems that the repo.mydomain.com
is resolved at the local (intramachine) IP, and then the repository hangsup or does not allow the connection to pass by. Or other reasons which I don't know now.
How can I make it working?
Upvotes: 1
Views: 1950
Reputation: 4301
So, the workaround is to use it as insecure docker repository, since intercomunication is within the local network. to do so:
/etc/docker/daemon.json
adding { "insecure-registries":["repo.mydomain.com:5000"] }
service docker restart
docker login -u USER -p PASS repo.mydomain.com:5000
now it says login successfully. Wondering if there's a better (cleaner) way to do it.
PS: to pull the data you have to use repo.mydomain.com:5000/image
Upvotes: 2