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
相关推荐
梦梦代码精5 小时前
《回收租赁系统技术选型避坑指南:业务闭环与二开自由度详解》
开发语言·低代码·docker·开源·代码规范
_itgo6 小时前
意图识别落地方案
运维·docker·容器
mengge.cloud6 小时前
0909华为云计算类综合服务小白实验教程
linux·运维·服务器·网络·华为云·云计算
QYR-分析8 小时前
蓝海赛道高速扩容!全球小型观察ROV市场格局、细分场景与发展趋势分析
大数据·运维·云计算
陈皮糖..8 小时前
从零搭建一个简易 AI 运维问答机器人(RAG + LangChain + Streamlit)
运维·人工智能·ai·langchain·机器人
制造业的搬运工9 小时前
AI服务器背板与传统背板差异:三大设计升级解析
运维·服务器·人工智能·科技·制造·pcb工艺
顶点多余9 小时前
仿muduo库实现高并发服务器项目
运维·服务器
脚踏实地,坚持不懈!9 小时前
Linux 6.18.7 内存分配与回收 —— 代码梳理
linux·运维·网络
2601_9623004710 小时前
python在运维上可以干什么,请举几个具体的例子
运维·python·系统管理·网络监控·自动化脚本
Android系统攻城狮11 小时前
Linux Gstreamer深度解析之gst_audio_format_build_integer调用流程与实战(十二)
linux·运维·服务器·音视频·车载音视频·gstreamer进阶