docker search报错Error response from daemon: Get “https://index.docker.io/v1/search?xx“:解决方案
我的是WSL2子系统,当前网络的DNS服务器发生变化了
执行修改了 /etc/host 文件,wq!以后还是会被还原。提示为:
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateHosts = false
遂执行
sudo vi /etc/wsl.conf
添加如下内容:
[network]
generateHosts = false
vi /etc/resolv.conf
添加红色框里边的三条DNS服务器解析地址,复制放到/etc/resolv.conf添加覆盖之前的就行。
然后执行
source ~/.bashrc
最后测试