互联网服务Docker

docker在CentOS7下配置other_args参数未生效

现在环境如下---------------myhost  私有库,安装了docker registry v2  映射到端口 5000host1  docker客户机,安装有docker---------------我现在编辑 host1 的/etc/sysconfig/docker /etc/sysconfig/docker # /etc/sysconfig/docker # # Other...显示全部
现在环境如下---------------
myhost  私有库,安装了docker registry v2  映射到端口 5000
host1  docker客户机,安装有docker
---------------
我现在编辑 host1 的/etc/sysconfig/docker
/etc/sysconfig/docker

# /etc/sysconfig/docker
#
# Other arguments to pass to the docker daemon process
# These will be parsed by the sysv initscript and appended
# to the arguments list passed to docker -d

other_args="--insecure-registry myhost:5000"


然后执行
# systemctl start docker

然后我用 host1 去搜索私有库时就报错了:
[root@docker05 bin]# docker search myhost:5000/xxx
Error response from daemon: invalid registry endpoint https://myhost:5000/v0/: unable to ping registry endpoint https://myhost:5000/v0/
v2 ping attempt failed with error: Get https://myhost:5000/v2/: tls: oversized record received with length 20527
 v1 ping attempt failed with error: Get https://myhost:5000/v1/_ping: tls: oversized record received with length 20527. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry myhost: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/myhost:5000/ca.crt


但是,我在host1用docker -d --insecure-registry myhost:5000 去跑,然后新建另外一个会话去search它又不报这个错了。
所以目前推断就是docker在CentOS7上设置other_args参数并未生效。


另外,还有一个问题。docker的润星日志在哪里看的?容器的日志我知道。但docker的运行日志我找不到在哪里。/var/log/docker也不存在。收起
参与27

查看其它 14 个回答胶东牛国磊的回答

胶东牛国磊胶东牛国磊系统架构师百度游戏
你直接用的myhost???
myhost要换成你的registry server的ip地址吧.
文化教育其它 · 2015-06-30
浏览4032

回答者

胶东牛国磊
系统架构师百度游戏
擅长领域: 云计算容器Docker

胶东牛国磊 最近回答过的问题

回答状态

  • 发布时间:2015-06-30
  • 关注会员:2 人
  • 回答浏览:4032
  • X社区推广