报错:
[root@client ~]# docker login -u admin -p Harbor12345 http://192.168.11.131
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://192.168.11.131/v2/: dial tcp 192.168.11.131:443: connect: no route to host

解决:指定私有仓库的地址(两种方法不可同时操作)
方法一:
vim /usr/lib/systemd/system/docker.service
#添加
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --insecure-registry 192.168.100.136
#重启服务
systemctl daemon-reload
systemctl restart docker.service

方法二:
vim /etc/docker/daemon.json
{
“insecure-registries”:[“192.168.11.133”],
“registry-mirrors”: [“https://7rp8a2t8.mirror.aliyuncs.com”]
}

#重启服务
systemctl daemon-reload
systemctl restart docker.service

转自:https://blog.csdn.net/ML908/article/details/105771477/

posted on 2023-07-13 10:45  06  阅读(220)  评论(0编辑  收藏  举报