当前位置: 代码迷 >> 综合 >> 报错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

热度:31   发布时间:2024-02-21 19:52:01.0

解决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-storeLogin Succeeded
  相关解决方案