从 registry
启动私有(private) docker 注册表后docker 镜像,登录注册表
docker login http://docker.mydomain.com:5000
FATA[0007] Error response from daemon: v1 ping attempt failed with error: Get https://docker.mydomain.com:5000/v1/_ping: dial tcp: lookup docker.mydomain.com: no such host. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry docker.mydomain.com:5000` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/docker.mydomain.com:5000/ca.crt
docker login --insecure-registry http://docker.mydomain.com:5000
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000010s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
5000/tcp open upnp
http://docker.mydomain.com:5000
在浏览器上:true
http://docker.mydomain.com:5000/v1/_ping
在浏览器上:{}
最佳答案
你误会了--insecure-registry
flag - 这是给你的守护进程而不是你的客户端。如错误消息中所述:
please add
--insecure-registry docker.mydomain.com:5000
to the daemon's arguments.
https://stackoverflow.com/questions/29935325/