互联网服务Docker

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

现在环境如下---------------
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

15同行回答

胶东牛国磊胶东牛国磊系统架构师百度游戏
# Enable insecure registry communication by appending the registry URL# to the INSECURE_REGISTRY variable below and uncommenting it# INSECURE_REGISTRY='--insecure-registry '试试这个, 或者# Modify these options if you want to change the way the docker...显示全部
# Enable insecure registry communication by appending the registry URL
# to the INSECURE_REGISTRY variable below and uncommenting it
# INSECURE_REGISTRY='--insecure-registry '

试试这个, 或者
# Modify these options if you want to change the way the docker daemon runs
OPTIONS='--selinux-enabled'收起
文化教育其它 · 2015-06-30
浏览9045
dotNetDR_dotNetDR_软件开发工程师电商公司
other_args="--insecure-registry=myhost:5000"这样,试试呢?胶东牛国磊 发表于 2015-6-30 13:56     这样子的我刚试过了,问题还是依旧。目前仅只有[修改 docker.service 里加上--insecure-registry参数重启docker后可以生效]。github遇到同样问题的在 &n...显示全部
other_args="--insecure-registry=myhost:5000"这样,试试呢?
胶东牛国磊 发表于 2015-6-30 13:56



    这样子的我刚试过了,问题还是依旧。目前仅只有[修改 docker.service 里加上--insecure-registry参数重启docker后可以生效]。
github遇到同样问题的在  https://github.com/docker/docker-registry/issues/1005收起
互联网服务 · 2015-06-30
浏览6925
dotNetDR_dotNetDR_软件开发工程师电商公司
回复 3# dl528888     Docker version 1.7.0, build 0baf609    CentOS7我这边机器有2个版本:CentOS Linux release 7.0.1406 (Core)、CentOS Linux release 7.1.1503 (Core)均有此问题。显示全部
回复 3# dl528888


    Docker version 1.7.0, build 0baf609    CentOS7我这边机器有2个版本:CentOS Linux release 7.0.1406 (Core)、CentOS Linux release 7.1.1503 (Core)均有此问题。收起
互联网服务 · 2015-06-30
浏览6881
胶东牛国磊胶东牛国磊系统架构师百度游戏
other_args="--insecure-registry=myhost:5000"这样,试试呢?显示全部
other_args="--insecure-registry=myhost:5000"这样,试试呢?收起
文化教育其它 · 2015-06-30
浏览6871
dotNetDR_dotNetDR_软件开发工程师电商公司
目前搜索到一个方案,就是修改 docker.service 里加上--insecure-registry参数重启docker后可以生效!!显示全部
目前搜索到一个方案,就是修改 docker.service 里加上--insecure-registry参数重启docker后可以生效!!收起
互联网服务 · 2015-06-29
浏览6811

提问者

dotNetDR_
软件开发工程师电商公司
擅长领域: Docker云计算容器引擎

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2015-06-29
  • 关注会员:2 人
  • 问题浏览:34984
  • 最近回答:2016-01-13
  • X社区推广