Error response from daemon: Get https:index.docker.iov1search?q=nginx&n=25: dial tcp: lookup ind

    科技2024-12-15  12

    使用docker报错 Error response from daemon: Get https://index.docker.io/v1/search?q=nginx&n=25: dial tcp: lookup index.docker.io: no such host

    配置网络工作

    在/etc/sysconfig/network文件里增加如下配置

    NETWORKING=yes # 网络是否工作,此处一定不能为no

    查看服务器DNS网络配置

    vim /etc/resolv.conf

    把里面的内容注释,并改为:

    nameserver 8.8.8.8

    重启网络服务

    systemctl restart network

    重启docker

    systemctl restart docker
    Processed: 0.059, SQL: 8