REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
registry latest 5562556b14f9 8 days ago 422.9 MB
127.0.0.1:5000/registry latest 5562556b14f9 8 days ago 422.9 MB
假设缺少上面这一步。直接push image,会出现例如以下错误。
[docker@docker1 ~]$ docker push registry
The push refers to a repository [registry] (len: 1)
Sending image list
2014/10/27 15:48:25 Error: Status 403 trying to push repository registry: Account is not Active
运行例如以下push命令后。能够在http://主机IP:5000/v1/search看到存储到Docker私有仓库的信息。
[docker@docker1 ~]$ docker push 127.0.0.1:5000/registry
2014/12/02 11:33:04 Error: Invalid registry endpoint https://127.0.0.1:5000/v1/: Get https://127.0.0.1:5000/v1/_ping: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 127.0.0.1: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/127.0.0.1:5000/ca.crt
使用registry的server和client启动docker时都须要加上"--insecure-registry"參数,pull和push才可正常操作。例如以下命令(ip都是registry所在server的ip地址)。