2026 年 5 月国内可用 Docker 镜像源列表与配置方法

本文整理 2026 年 5 月 12 日可作为起点验证的国内 Docker 镜像源,并给出 Linux、Docker Desktop、临时拉取、GHCR/MCR/K8s/Quay 镜像替换和常见错误排查方法。

说明:Docker 镜像源可用性会随网络、服务方策略和上游同步状态变化。本文不承诺永久可用,建议按本文的验证命令在自己的网络环境里测试。

1. 国内 Docker 镜像源列表

类型 镜像源 地址 适合场景
Docker Hub 加速 毫秒镜像 https://docker.1ms.run 开发机、服务器、NAS、CI 预检
GHCR 加速 毫秒镜像 GHCR https://ghcr.1ms.run GitHub Container Registry 镜像
公开镜像站 DaoCloud https://docker.m.daocloud.io 临时开发、旧项目补救
可信基础镜像 AtomHub https://atomhub.openatom.cn 基础镜像、安全敏感场景
云厂商个人加速 阿里云 https://<your_code>.mirror.aliyuncs.com 阿里云账号绑定环境
云厂商内网加速 腾讯云 https://mirror.ccs.tencentyun.com 腾讯云内网机器

建议把"公开源列表"当作候选池,不要一次性堆进生产环境。生产环境更建议固定镜像版本,并同步到 Harbor、ACR、TCR 或其他内部仓库。

2. Linux Docker Engine 配置

编辑 /etc/docker/daemon.json

bash 复制代码
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json >/dev/null <<'EOF'
{
  "registry-mirrors": [
    "https://docker.1ms.run",
    "https://docker.m.daocloud.io"
  ]
}
EOF

重启 Docker:

bash 复制代码
sudo systemctl daemon-reload
sudo systemctl restart docker
docker info | grep -A 10 "Registry Mirrors"

验证:

bash 复制代码
docker pull nginx:alpine
docker pull redis:7-alpine
docker pull postgres:16-alpine

如果你想显式使用加速入口,也可以这样写:

bash 复制代码
docker pull docker.1ms.run/nginx:alpine
docker pull docker.1ms.run/redis:7-alpine
docker pull docker.1ms.run/postgres:16-alpine

3. Docker Desktop 配置

macOS / Windows 使用 Docker Desktop 时,进入:

text 复制代码
Settings -> Docker Engine

加入:

json 复制代码
{
  "registry-mirrors": [
    "https://docker.1ms.run",
    "https://docker.m.daocloud.io"
  ]
}

保存后点击 Apply & Restart

验证:

bash 复制代码
docker info
docker pull docker.1ms.run/nginx:alpine

4. GHCR、MCR、K8s、Quay 不能只靠 Docker Hub mirror

registry-mirrors 主要处理 Docker Hub。很多新项目已经不只从 Docker Hub 分发镜像。

常见替换规则:

上游源 替换入口 示例
docker.io docker.1ms.run docker pull docker.1ms.run/nginx:alpine
ghcr.io ghcr.1ms.run docker pull ghcr.1ms.run/github/github-mcp-server
mcr.microsoft.com mcr.1ms.run docker pull mcr.1ms.run/playwright/mcp
registry.k8s.io k8s.1ms.run docker pull k8s.1ms.run/pause:3.10
quay.io quay.1ms.run docker pull quay.1ms.run/prometheus/prometheus:latest
nvcr.io nvcr.1ms.run docker pull nvcr.1ms.run/nvidia/tritonserver:24.12-py3
docker.elastic.co elastic.1ms.run docker pull elastic.1ms.run/elasticsearch/elasticsearch:8.15.0

示例:

bash 复制代码
docker pull ghcr.1ms.run/github/github-mcp-server
docker pull mcr.1ms.run/playwright/mcp
docker pull k8s.1ms.run/pause:3.10
docker pull quay.1ms.run/prometheus/prometheus:latest

5. docker-compose.yml 写法

如果是临时项目,可以直接在 image 里写镜像入口:

yaml 复制代码
services:
  nginx:
    image: docker.1ms.run/nginx:alpine
    ports:
      - "8080:80"

  redis:
    image: docker.1ms.run/redis:7-alpine

  mcp:
    image: ghcr.1ms.run/github/github-mcp-server

然后执行:

bash 复制代码
docker compose pull
docker compose up -d

这种写法的好处是清楚:项目依赖来自哪个上游源,一眼能看出来。

6. Kubernetes 中的写法

如果 Pod 卡在 ImagePullBackOff,先看镜像来源:

bash 复制代码
kubectl describe pod <pod-name>
kubectl get events --sort-by=.lastTimestamp

示例:

yaml 复制代码
apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo-nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: demo-nginx
  template:
    metadata:
      labels:
        app: demo-nginx
    spec:
      containers:
        - name: nginx
          image: docker.1ms.run/nginx:alpine

K8s 基础组件或沙箱镜像可按需替换:

bash 复制代码
docker pull k8s.1ms.run/pause:3.10
docker pull k8s.1ms.run/kube-apiserver:v1.28.0
docker pull quay.1ms.run/prometheus/prometheus:latest

7. 推荐验证顺序

不要只测 hello-world。推荐至少测这几类:

bash 复制代码
docker pull docker.1ms.run/nginx:alpine
docker pull docker.1ms.run/redis:7-alpine
docker pull docker.1ms.run/postgres:16-alpine
docker pull ghcr.1ms.run/github/github-mcp-server
docker pull mcr.1ms.run/playwright/mcp
docker pull k8s.1ms.run/pause:3.10
docker pull quay.1ms.run/prometheus/prometheus:latest

AI/ML 环境建议额外测试大镜像:

bash 复制代码
docker pull docker.1ms.run/pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel

8. 常见错误排查

错误 常见原因 处理方式
manifest unknown 镜像名或 tag 不存在 检查镜像路径和 tag
unauthorized 私有镜像或需要登录 docker login 后重试
TLS handshake timeout 网络链路不稳定 更换镜像入口,检查代理
context deadline exceeded 镜像层下载超时 换源、缩小镜像、分层预拉
429 Too Many Requests Docker Hub 限流 登录账号、换出口、使用缓存
ImagePullBackOff K8s 拉取失败 看 Pod 事件,确认镜像来源

9. 不建议长期使用的旧源

很多历史文章会出现以下地址:

text 复制代码
https://hub-mirror.c.163.com
https://docker.mirrors.ustc.edu.cn
https://dockerhub.icu
https://dockerproxy.cn
https://dockerpull.com

这些地址有的停止同步,有的证书、DNS 或服务状态不稳定。个人临时测试可以自行验证,但不建议继续作为团队服务器、CI、NAS 的长期主源。

10. 总结

2026 年配置 Docker 镜像源,不建议只复制一长串地址。更稳的做法是:

  1. Docker Hub 用 registry-mirrors
  2. GHCR、MCR、K8s、Quay 按上游源替换入口。
  3. 生产环境固定版本并同步到内部仓库。
  4. 上线前用真实镜像测试,不只测 hello-world

镜像源没有永久可用清单,只有定期验证、场景分层和备用方案。

相关推荐
SelectDB16 小时前
Litefuse 开源并推出单进程轻量模式,25 秒就能跑起来的 Agent 可观测与评估平台
运维·后端·自动化运维
曲幽1 天前
别再用网页翻译看源码了!你的私人翻译神器LibreTranslate,部署避坑指南来了
python·docker·web·pot·translate·libretranslate·arogstranslate
XIAOHEZIcode2 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户0328472220703 天前
如何搭建本地yum源(上)
运维
武子康3 天前
调查研究-183 Apple container:Mac 上用轻量 VM 跑 Linux 容器,Swift 会改写本地容器体验吗?
docker·容器·apple
大树886 天前
金刚石散热越强,管路越先见顶
大数据·运维·服务器·人工智能·ai
摇滚侠6 天前
Linux CentOS7 rpm 安装 MySQL 5.7
linux·运维·mysql
霸道流氓气质6 天前
领域驱动设计(DDD)在 Spring Boot 微服务中的实践指南
运维·spring boot·微服务
Inhand陈工6 天前
基于台达PLC与映翰通IG502的智慧水产养殖精准投喂与远程运维解决方案
运维·人工智能·物联网·阿里云·信息与通信
Alsn866 天前
等待学习-学习目录:Docker 容器安全攻防
学习·安全·docker