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
相关推荐
想你依然心痛1 小时前
HarmonyOS 6(API 23)智能体驱动的沉浸式AR城市地下管网运维中心
运维·ar·harmonyos·智能体
文青小兵1 小时前
Linux云计算——docker镜像(三)
linux·docker·云计算
feng14561 小时前
OpenSREClaw - 一切始于风险洞察报告
运维
IT策士1 小时前
第29篇 k8s之Service 与 Endpoints 深入:服务发现原理
容器·kubernetes·服务发现
零壹AI实验室1 小时前
AI发现潜伏18年的NGINX高危漏洞:CVE-2026-42945完整技术分析
运维·人工智能·nginx
wgc2k1 小时前
Nest.js基础-5:关于Docker的简单概述
docker·typescript·node.js
Benszen2 小时前
Kubernetes容器编排解决方案【基础篇】
云原生·容器·kubernetes
zzzsde2 小时前
【Linux】线程同步和互斥(5):线程池的实现&&线程安全
linux·运维·服务器·开发语言·算法·安全
雾岛心情2 小时前
【小铭邮件】小铭邮件工具箱公司版从PST提取EML邮件
运维·工具·exchage·o365·小铭邮件工具箱(公司版)