docker报错-无法解析 registry-1.docker.io

问题

执行docker的拉取容器命令docker pull xxxx,结果报无法解析 registry-1.docker.io的错误,如图

解决

修改/etc/resolv.conf文件,配置如下

bash 复制代码
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

#nameserver 127.0.0.53
nameserver 114.114.114.114
nameserver 8.8.8.8
相关推荐
天远API28 分钟前
零信任架构实战:基于天远运营商二要素V即时版构建自动化分时租赁出行会员身份一致性审核网关
运维·人工智能·架构·自动化
极光通讯39 分钟前
液冷服务器对内存和SSD的适配要求:高密度部署下的散热与信号完整性
运维·服务器
2501_937767162 小时前
面向设计 / 研发部门:终端文件统一归档 + 服务器定时备份实践
运维·安全
程序员老赵2 小时前
Docker 部署 Hue:轻松搭建数据库与数据仓库 SQL 查询平台
sql·docker·开源
重生之高冷汉堡包3 小时前
ChatGPT 如何打造自动化账号:从零搭建到高效运营
运维·chatgpt·自动化
aaa最北边3 小时前
Linux 上的交叉编译
linux·运维·服务器
小张成长计划..4 小时前
【Linux】27:日志
linux·运维·服务器
时间售卖铺4 小时前
Nginx 反向代理
运维·nginx·云原生
life码农4 小时前
Nginx location 优先级详解:匹配规则、修饰符与完整代码示例
运维·nginx
我命由我123454 小时前
Python 开发 - Python 虚拟环境
运维·开发语言·后端·python·http·https·java-ee