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
相关推荐
Zhu7582 小时前
离线二进制部署-Kubernetes-v1.36.4
容器·贪心算法·kubernetes
福建佰胜张工3 小时前
A5E00839230西门子工业核心配件详解:参数、安装调试与故障运维全攻略
运维·网络·安全·自动化
Lancker3 小时前
chnroute-linux — 中国大陆 IP 段每日自动更新 + 「仅允许国内访问」落地
linux·运维·tcp/ip
谢亮_vipxieliang3 小时前
镜像安全:扫描、签名与软件供应链
安全·docker
天远Date Lab3 小时前
零信任架构实战:基于天远全能消金报告(标准版)构建自动化骑手资信评估网关
运维·人工智能·架构·自动化
赛博守夜人3 小时前
反舞弊系列之二十一:数据驱动型反舞弊体系搭建,如何利用ERP与财务数据构建“异常交易自动化风控看板”?
运维·自动化
天衍四九-4 小时前
Docker容器实战系列(八):Docker生产最佳实践与避坑指南,系列终章
运维·docker·容器
大侠归来4 小时前
Ubuntu 搭建 APUE 环境:从源码编译到第一个示例跑通
linux·运维·ubuntu
IT小白杨4 小时前
市场调研的自动化访问,怎样控制节奏才不被误判?
运维·经验分享·安全·自动化·指纹浏览器
Zhou1411366 小时前
Docker_03_DockerCompose多容器编排
运维·docker·容器