📖 使用说明
1.支持加速的镜像平台
Docker Hub以外的镜像站点
序号 | 源站 | 平台 |
---|---|---|
1 | docker.io | Docker Hub |
2 | gcr.io | Google Container Registry |
3 | ghcr.io | GitHub Container Registry |
4 | k8s.gcr.io | Kubernetes Container Registry |
5 | registry.k8s.io | 新 Kubernetes Container Registry |
6 | quay.io | Red Hat Container Registry |
7 | mcr.microsoft.com | Microsoft Container Registry |
8 | docker.elastic.co | Elastic Container Registry |
9 | nvcr.io | NVIDIA Container Registry |
10 | registry.jujucharms.com | Juju Charms |
11 | cr.l5d.io | Linkerd 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.18
与adguard/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