Skip to content

📖 使用说明

👉 国内 DockerHub 入口

1.支持加速的镜像平台

Docker Hub以外的镜像站点

序号源站平台
1docker.ioDocker Hub
2gcr.ioGoogle Container Registry
3ghcr.ioGitHub Container Registry
4k8s.gcr.ioKubernetes Container Registry
5registry.k8s.io新 Kubernetes Container Registry
6quay.ioRed Hat Container Registry
7mcr.microsoft.comMicrosoft Container Registry
8docker.elastic.coElastic Container Registry
9nvcr.ioNVIDIA Container Registry
10registry.jujucharms.comJuju Charms
11cr.l5d.ioLinkerd Container Registry

2.加速器配置

TIP

/etc/docker/daemon.json 文件中, registry-mirrors 部分,请将代理地址替换为你搭建的 实际地址 ,如果SSL不是合法有效的证书,必须配置 insecure-registries 跳过不安全证书验证,URL是 https://example.openeeds.com ,可复制下列代码块内容,进行配置。

bash
cat > /etc/docker/daemon.json <<EOF
{
  "registry-mirrors": ["https://example.openeeds.com"],
  "insecure-registries": ["example.openeeds.com"],
  "exec-opts": ["native.cgroupdriver=systemd"]
}
EOF
bash
# 重启Docker服务
systemctl daemon-reload && systemctl restart docker

3.拉取测试

DANGER

📢 注意事项: 若在 /etc/docker/daemon.json 中配置了加速器地址,并且镜像源于 Docker Hub 时,可以无需加上域名前缀,其他镜像源站必须加上前缀,当前URL地址 + 原镜像地址 的方式,例如:

  • 源于 Docker Hub 镜像地址: alpine:3.18adguard/adguardhome ,则
bash
docker pull alpine:3.18
docker pull adguard/adguardhome
bash
# 当然也是可以加上前缀,如:
docker pull example.openeeds.com/docker.io/alpine:3.18
docker pull example.openeeds.com/docker.io/adguard/adguardhome
  • 拉取 非 Docker Hub 平台镜像时,必须加域名前缀,各个知名镜像站拉取测试,如下:
    URL地址: example.openeeds.com
    镜像地址: ghcr.io/openfaas/queue-worker
bash
# Google
docker pull example.openeeds.com/gcr.io/kaniko-project/executor:debug
# GitHub
docker pull example.openeeds.com/ghcr.io/openfaas/queue-worker
# Kubernetes
docker pull example.openeeds.com/k8s.gcr.io/etcd:3.5.7-0
# 新Kubernetes
docker pull example.openeeds.com/registry.k8s.io/kube-apiserver:v1.30.0
# Red Hat
docker pull example.openeeds.com/quay.io/calico/cni
# Microsoft
docker pull example.openeeds.com/mcr.microsoft.com/powershell
# Elastic 
docker pull example.openeeds.com/docker.elastic.co/elasticsearch/elasticsearch:8.1.0
# NVIDIA
docker pull example.openeeds.com/nvcr.io/nvidia/cuda:12.1.0-runtime-ubuntu20.04