码迷,mamicode.com
首页 > Web开发 > 详细

docker 1.12.0 私有仓库https问题

时间:2016-08-17 23:14:03      阅读:1811      评论:0      收藏:0      [点我收藏+]

标签:localhost   仓库   error   dockerhttp   docker.https   

docker 版本为1.12.0
centos 7


因为自己本身没有参与玩docker,不过同事出现了一个问题:

Aug 17 21:07:24 localhost dockerd: time="2016-08-17T21:07:24.864612251+08:00" level=error msg="Attempting next endpoint for push after error: Get https://192.168.41.80:5001/v2/: dial tcp 192.168.41.80:5001: getsockopt: connection refused"

Aug 17 21:07:24 localhost dockerd: time="2016-08-17T21:07:24.864884008+08:00" level=error msg="Attempting next endpoint for push after error: Get https://192.168.41.80:5001/v1/_ping: dial tcp 192.168.41.80:5001: getsockopt: connection refused"



很郁闷,一直都是https  但是搜索了大量的文章 都是说的解决方法:
vim /etc/default/docker
增加以下一行
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry=104.131.173.242:5000"
重启Docker
sudo service docker restart



类似如上所说,但是我想说 这是不对的,这个文件都没有自己添加 也是没有效果  也不卖关子了,翻墙别人8月2号回复的解决办法

  • Create or modify /etc/docker/daemon.json

    { "insecure-registries":["myregistry.example.com:5000"] }

  • Restart docker daemon

      systemctl restart docker.service


完美解决。


花了2个小时 哎。。。特此记录一下

本文出自 “路的方向。迷茫” 博客,请务必保留此出处http://qidai.blog.51cto.com/6435621/1839702

docker 1.12.0 私有仓库https问题

标签:localhost   仓库   error   dockerhttp   docker.https   

原文地址:http://qidai.blog.51cto.com/6435621/1839702

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!