![]() |
1
cheng6563 3 天前
把地址打全吧,别镜像了
|
2
hefish 3 天前
翻墙就行啦。镜像之前吃过亏,为了避免不必要的麻烦,都从官方走,不用镜像。
|
3
isxzlhhh OP 地址打全确实可以,但是就是想知道问题到底出在哪
|
4
isxzlhhh OP 有没有运维大佬能帮忙看下这个问题啦,跪求跪求跪求,帮帮小弟吧
|
![]() |
5
skiy 3 天前
只会 docker 。只知道修改 `/etc/docker/daemon.json`。没了。其它的啥也不懂。
cat /etc/docker/daemon.json { "registry-mirrors": [] } |
![]() |
6
SeanChang PRO 如果这些免费的镜像不可用或者不稳定也会回退到官方。
看下轩辕镜像这个文档~ https://xuanyuan.cloud/usage/containerd |
7
isxzlhhh OP 已经确定免费镜像是可以用的哦
|
8
feedcode 3 天前
ctr 不走 containerd 的 plugin 配置,plugins."io.containerd.grpc.v1.cri".registry 对 ctr 无用
The ctr utility is a command-line interface for directly interacting with the containerd daemon. It uses containerd's native API, not the CRI plugin's API. Therefore, when you use ctr image pull, it does not consult the registry mirror configurations set up for the CRI plugin. |
10
gsw945 3 天前 via iPhone ![]() 如果你有梯子(提供 socks5)的话,可以使用 skopeo( https://github.com/containers/skopeo),它支持通过环境变量 HTTP_PROXY 或 HTTPS_PROXY 走代理,一个纯二进制工具,仅仅下镜像的话,系统上连 socker 都不需要。我一般这样用:
使用示例(以镜像 redis:latest 为例): ```bash # 示例 1: 下载镜像到文件夹(文件夹需要存在的空目录) skopeo copy docker://redis:latest dir:/home/xxx/redis-image # 示例 2: 从目录镜像导入到 docker skopeo copy dir:/home/xxx/redis-image docker-daemon:redis:latest # 示例 3: 拉取镜像并导入到 docker skopeo copy docker://redis:latest docker-daemon:redis:latest ``` |
11
isxzlhhh OP @gsw945 我主要是想 k8s 下载镜像的时候方便一点,到现在配了镜像加速,k8s 还是下不了镜像,虽然还有别的方法能下载到镜像,但是我还是更纠结于这个原因是什么
|
![]() |
12
billzhuang 3 天前 via iPhone
你这个 k8s 是自己玩的还是公司的?
|
13
isxzlhhh OP @billzhuang 自己玩的
|
14
gsw945 3 天前 via iPhone
@isxzlhhh 个人感觉加速源不稳定,/etc/docker/daemon.json 我配置了大概 6 个左右的加速源,但效果时好时坏,有时候镜像一个大一点儿的 layer ,能拉几个小时。自从找到 skopeo 后,拉镜像时就不那么烦躁了,而且 clash 切换源,skopeo 不会断开,唯一缺点时,skopeo 进程如果 Ctrl+C 强杀了,不会断点续传。skopeo 传输镜像, 是使用 source 和 target 的概念,对于 k8s 也很方便,target 可以是自托管的镜像仓库,命令行也直接支持传递认证信息。
|
16
ExplodingFKL 19 小时 2 分钟前
不要用 ctr ,用 nerdctl 来管理 containerd
|