docker dial tcp 10.200.10.10:5000: connect: connection refused

docker是yum安装版本是19.03.5

yum安装的此版本/etc/docker/并没有daemon.json文件

然后修改vim  /usr/lib/systemd/system/docker.service

#在ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock  后加--insecure-registry=10.200.10.10:5000

ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --insecure-registry=10.200.10.10:5000

systemctl daemon-reload

systemctl restart docker

docker login 10.200.10.10:5000 还是报错5000: connect: connection refused

然后在/etc/docker/添加daemon.json文件 

{ "insecure-registries":["10.200.10.10:5000"] }

systemctl daemon-reload

systemctl restart docker

docker 启动不了

查找报错后发现此版本/etc/docker的文件名得写成daemon.json.rpmsave

/etc/docker/daemon.json.rpmsave

systemctl daemon-reload

systemctl restart docker

测试ok

posted @ 2019-12-10 09:22  Drutor  阅读(5366)  评论(0编辑  收藏  举报