$ docker push xxx.xxx.xxx.xxx:5000/java-8 The push refers to repository [xxx.xxx.xxx.xxx/java-8] Get https://xxx.xxx.xxx.xxx:5000/v2/: http: server gave HTTP response to HTTPS client
Docker自從1.3.X以後docker registry交互默認使用的是HTTPS,可是搭建私有鏡像默認使用的是HTTP服務致使。java
# 修改啓動文件第12行
# vim /usr/lib/systemd/system/docker.service
# ExecStart=/usr/bin/dockerd --insecure-registry xxx.xxx.xxx.xxx:5000
# 或者增長deamon.json文件配置
$ vim /etc/docker/daemon.json { "insecure-registries":["xxx.xxx.xxx.xxx:5000"] }
# 最後重啓服務
$ systemctl daemon-reload $ systemctl restart docker