惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
小众软件
小众软件
O
OpenAI News
C
Cyber Attacks, Cyber Crime and Cyber Security
I
Intezer
NISL@THU
NISL@THU
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
阮一峰的网络日志
阮一峰的网络日志
Hacker News: Ask HN
Hacker News: Ask HN
D
Docker
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic
A
About on SuperTechFans
Stack Overflow Blog
Stack Overflow Blog
C
CERT Recently Published Vulnerability Notes
L
LINUX DO - 最新话题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
Hacker News - Newest:
Hacker News - Newest: "LLM"
G
Google Developers Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
GRAHAM CLULEY
S
Schneier on Security
T
Tor Project blog
Spread Privacy
Spread Privacy
PCI Perspectives
PCI Perspectives
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
F
Fortinet All Blogs
L
Lohrmann on Cybersecurity
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
The Exploit Database - CXSecurity.com
TaoSecurity Blog
TaoSecurity Blog
Apple Machine Learning Research
Apple Machine Learning Research
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
罗磊的独立博客

DevOps

复制企业级 Linux 开发环境:如何实现严格开发环境与生产环境一致性的基础架构策略 - V2EX 带有账密的 ISP 住宅代理,海外服务器请求正常, macOS 本地 curl 持续失败 A lock-file-based plugin manager for Jenkins 从 2022 年至今, DevOps 技术栈有什么新的发展吗 oracle 1U1G 机器能吗? 各位都是怎样优雅的 pull 容器镜像的 Gisia 新版发布,增加看板功能,欢迎提意见 内部做一个新的环境,在更新生产环境前先把生产服务等先在这个服务上过一遍,确认没问题后再上生产,这个环境叫什么环境?这种流程叫什么流程? 一个 Jenkins 技术问题,要被搞疯了 推荐一款轻量级 DevOps 平台 tg 上运维/sre/devops 相关的交流群 有哪些能满足要求的 DevOps 平台? 国内参加 CKA/CKAD 考试有无推荐的代理提供商 关于 Java 项目的健康检查、自愈和轻量级管理 drone 构建一直卡住,心力憔悴 [Terraform/腾讯云] 有用 Terraform 来管理腾讯云的朋友吗,它这个频率限制真的没问题吗? 遇到一点证书问题,望运维大佬给看看 - V2EX 关于 CMDB 如何保证数据一致性的讨论 Red Hat Access 文档下载求助 各位 Linux 运维的巨佬工作用 mac 吗 - V2EX 在单服务器搭最小规模的 CICD 的技术栈是什么 - V2EX 遇到一个 Redis 跨 VPC 读取的问题 好奇 Linux 运维 修改配置一般有做版本控制吗 - V2EX 私有化 SaaS 系统应该支持随便换域名吗 - V2EX 请教一个关于容器化部署的问题 官方 helm charts V.S. bitnami helm charts V.S. 官方 operator,大家一般倾向于用哪个? terraform 原理的一点儿思考 私有化部署太难搞了 - V2EX Google SRE 的 on-call 方法和工具 开发转做运维开发,有什么需要注意的?需要额外学习和掌握什么? 大家的 CI 都是怎么搭建的? 开源 CMDB 新增支持多种认证方式: CAS、OAuth2.0、OIDC,并已兼容测试 casdoor 很好奇还有没有类似 Jenkins 的 配置 Freestyle 项目的 CI/CD 工具 坚持为「专业性」买单,就是最大的降本增效! KCL 社区最新动态速递 | IDE 插件支持引用查找和重命名、CNCF ArtifactHub KCL 集成 - V2EX cmdb vs rpa ? 国内有没有类似 FreeIPA 和 Keycloak 的产品? 求推荐一个可以管理多个 Linux 系统的平台 ipv6 访问 docker 最优雅的姿势是啥? 私有化部署术语大家一般用 self-host(及其变种)还是 on-premise? 上线时需要将迭代期内的各种配置改动同步到生产环境,有没有好用的配置备忘录的工具? 有没有数据库 CICD 方面比较好的实践 Nexus Repository 3 权限管理思路, LDAP 集成与单点,助力 CI/CD 加速 sonarqube 与 gitlab 的账号单点认证与项目集成详解 如何设置 azure devops 上 创建的 pull request 在满足某些条件时, 自动能够完成合并到目标分支 jenkins pipeline 如何在 stage3 错误的时候,返回 stage2 重新执行 4 位硬科技创始人对谈 DevOps 硬件实战 jenkins 如何在一个任务中创建多个构建触发器,并且每个构建触发器对应的步骤是不同的 Unity 单元测试和 Gitlab 自动化集成示例 怎么做好运维 Windows Server 如何做 CI/CD?
使用 containerd 配置镜像加速不生效问题
isxzlhhh · 2025-08-29 · via DevOps

问题:由于国内 docker.io 镜像仓库关闭了,所以想配置镜像加速,但是配置好像一直没有生效,还是从官方仓库拉取镜像

containerd version:ctr github.com/containerd/containerd v1.7.27

containerd config:

version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0

[grpc]
address = "/run/containerd/containerd.sock"
uid = 0
gid = 0
max_recv_message_size = 16777216
max_send_message_size = 16777216

[debug]
address = "/run/containerd/containerd-debug.sock"
uid = 0
gid = 0
level = "warn"

[timeouts]
"io.containerd.timeout.shim.cleanup" = "5s"
"io.containerd.timeout.shim.load" = "5s"
"io.containerd.timeout.shim.shutdown" = "3s"
"io.containerd.timeout.task.state" = "2s"

[plugins]
[plugins."io.containerd.grpc.v1.cri"]
sandbox_image = "sealos.hub:5000/pause:3.9"
max_container_log_line_size = 16384
max_concurrent_downloads = 20
disable_apparmor = true
[plugins."io.containerd.grpc.v1.cri".containerd]
snapshotter = "overlayfs"
default_runtime_name = "runc"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.crun]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.crun.options]
BinaryName = "/usr/bin/crun"
SystemdCgroup = true
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d"
certs.d 目录下有三个目录( docker.io registry.k8s.io sealos.hub:5000 ),每个目录各自配置了 hosts.toml
docker.io->hosts.toml
server = "https://docker.io"

[host."https://docker.1ms.run"]
capabilities = ["pull", "resolve"]
[host."https://docker.m.daocloud.io"]
capabilities = ["pull", "resolve"]
[host."https://dockerproxy.com"]
capabilities = ["pull", "resolve"]
registry.k8s.io->hosts.toml
server = "registry.k8s.io"

[host."k8s.m.daocloud.io"]
capabilities = ["pull", "resolve"]

使用 ctr 拉取镜像,还是拉取不了

root@localhost:/etc/containerd/certs.d/registry.k8s.io# ctr --debug images pull docker.io/library/nginx:latest

DEBU[0000] fetching image="docker.io/library/nginx:latest"
DEBU[0000] resolving host=registry-1.docker.io
DEBU[0000] do request host=registry-1.docker.io request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*" request.header.user-agent=containerd/v1.7.27 request.method=HEAD url="https://registry-1.docker.io/v2/library/nginx/manifests/latest"
INFO[0030] trying next host error="failed to do request: Head \"https://registry-1.docker.io/v2/library/nginx/manifests/latest\": dial tcp 118.193.240.41:443: i/o timeout" host=registry-1.docker.io
ctr: failed to resolve reference "docker.io/library/nginx:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": dial tcp 118.193.240.41:443: i/o timeout

但是还有个奇怪的问题就是 使用 crictl 拉取镜像是能够正常拉取的

root@localhost:/etc/containerd/certs.d/registry.k8s.io# crictl pull nginx:latest
Image is up to date for sha256:47ef8710c9f5a9276b3e347e3ab71ee44c8483e20f8636380ae2737ef4c27758

这个问题困扰小弟很久了,跪求各位大佬帮忙看看是啥问题