针对最近封锁docker镜像,国内拉取docker镜像方法

方法一:

官方镜像路径前面加域名

例子
  1. docker pull docker.fxxk.dedyn.io/stilleshan/frpc:latest
  2. docker pull docker.fxxk.dedyn.io/library/nginx:stable-alpine3.19-perl
方法二:

配置daemon.json,一键设置镜像加速

命令(一次性复制以下命令运行)

sudo mkdir -p /etc/docker

sudo tee /etc/docker/daemon.json <<EOF

{

  "registry-mirrors": [

    "https://docker.fxxk.dedyn.io",

    "https://huecker.io",

    "https://dockerhub.timeweb.cloud",

    "https://noohub.ru"

  ]

}

EOF

sudo systemctl daemon-reload

sudo systemctl restart docker

方法三:

一行命令帮你拉取镜像

bash -c "$(curl -fsSL https://cn.bbc.us.kg/docker-pull.sh)" -- <镜像名称> [可选镜像存放地址]

例子:

bash -c "$(curl -fsSL https://cn.bbc.us.kg/docker-pull.sh)" -- nginx:latest

方法四:这个也超简单

自己 在Cloudflare Workers或pages 上部署 Docker 镜像代理,需要cf有绑定域名。

部署超简单的,代码在这里:

https://github.com/cmliu/CF-Workers-docker.io/

需要免费可绑定cf的二级域名的看这里:

https://www.bilibili.com/video/BV13M4m1z7SF/

https://www.bilibili.com/video/BV1D94y1T7UD/ (be及ch后缀可绑cf)

About the Author

Avatar photo

今生在线

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据