当前位置:   article > 正文

2024 最新docker/containerd镜像源,7月,8月_最新docker镜像源

最新docker镜像源

docker 配置下面的镜像源

vi /etc/docker/daemon.json

添加如下配置

{
	"registry-mirrors": ["https://docker.anyhub.us.kg", "https://docker.awsl9527.cn"]
}

systemctl stop docker
systemctl daemon-reload
systemctl start docker
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

containerd配置镜像源

# 生成默认配置
mkdir /etc/containerd
containerd config default | tee /etc/containerd/config.toml

vi /etc/containerd/config.toml

添加如下配置

#sandbox_image = "k8s.gcr.io/pause:3.2"
# 注释上面那行,添加下面这行
sandbox_image = "registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.2"

# 配置Containerd直接使用systemd去管理cgroupfs
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
  # 添加下面这行
  SystemdCgroup = true
       

[plugins."io.containerd.grpc.v1.cri".registry] #此行下修改
      config_path = "/etc/containerd/certs.d" # 改为此路径,并且需要在此路径下创建hosts.toml文件,用于存放镜像加速信息

# 创建/etc/containerd/certs.d下的hosts文件
# mkdir -p /etc/containerd/certs.d/docker.io
# vim /etc/containerd/certs.d/docker.io/hosts.toml
server = "https://docker.io"
[host."https://docker.anyhub.us.kg"]
  capabilities = ["pull", "resolve"]


systemctl daemon-reload
systemctl restart containerd
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

如果有用欢迎各位大佬帮忙为我的开源项目 star一下。

github地址:https://github.com/tencentmusic/cube-studio

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/酷酷是懒虫/article/detail/992804?site
推荐阅读
相关标签
  

闽ICP备14008679号