报错Error response from daemon: Get https://20.0.0.51/v2/: dial tcp 20.0.0.51:443: connect: connection

解决Error response from daemon: Get https://20.0.0.51/v2/: dial tcp 20.0.0.51:443: connect: connection refused报错问题

报错现象

在这里插入图片描述

解决方法

[root@localhost ~]# vim /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H fd:// --insecure-registry 20.0.0.51 --containerd=/run/containerd/containerd.sock
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl restart docker.service 
[root@localhost ~]# docker login -u admin -p Harbor12345 http://20.0.0.51
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

猜你喜欢

转载自blog.csdn.net/m0_47219942/article/details/108759309
今日推荐