🐋 Docker Hub 镜像代理

基于 Cloudflare Workers  ·  支持 pull / push · 认证 · Registry API

🌐 国际线路:dh.lihongjie.cn 🇨🇳 国内优选:dh.cn.lihongjie.cn

🚀 快速拉取

1

直接在镜像名前加上代理域名:

docker pull dh.cn.lihongjie.cn/library/nginx:latest
docker pull dh.cn.lihongjie.cn/library/ubuntu:22.04
docker pull dh.cn.lihongjie.cn/username/image:tag

⚙️ 配置为默认镜像源

1

编辑 /etc/docker/daemon.json,添加镜像源:

{
  "registry-mirrors": ["https://dh.cn.lihongjie.cn"]
}
2

重启 Docker 使配置生效:

sudo systemctl restart docker
3

之后直接使用标准命令,无需修改镜像名:

docker pull nginx:latest
docker pull ubuntu:22.04

🔐 推送镜像

1

使用 Docker Hub 账号登录代理:

docker login dh.cn.lihongjie.cn
2

打 tag 并推送:

docker tag myimage:latest dh.cn.lihongjie.cn/username/myimage:latest
docker push dh.cn.lihongjie.cn/username/myimage:latest

📡 代理端点

路径目标用途
/tokenauth.docker.io/tokenOAuth 2 认证
/v2/*registry-1.docker.io/v2/*Registry API(pull / push / tags)