set docker registry mirror:
sudo tee /etc/docker/daemon.json <<EOF
{
"registry-mirrors": ["https://{{host}}"]
}
EOF
sudo systemctl restart docker
Usage
# docker pull nginx:latest
docker pull dk.{{host}}/library/nginx:latest # pull Docker mirror
# docker pull quay.io/coreos/etcd:latest
docker pull quay.{{host}}/coreos/etcd:latest # pull Quay mirror
# docker pull gcr.io/google-containers/busybox:latest
docker pull gcr.{{host}}/google-containers/busybox:latest # pull GCR mirror
# docker pull k8s.gcr.io/pause:latest
docker pull k8s-gcr.{{host}}/pause:latest # pull k8s.gcr.io mirror
# docker pull registry.k8s.io/pause:latest
docker pull k8s.{{host}}/pause:latest # pull registry.k8s.io mirror
# docker pull ghcr.io/github/super-linter:latest
docker pull ghcr.{{host}}/github/super-linter:latest # pull GitHub mirror
# docker pull docker.cloudsmith.io/public/repo/image:latest
docker pull cloudsmith.{{host}}/public/repo/image:latest # pull Cloudsmith mirror
pull retag re-push
docker pull {{host}}/library/alpine:latest # library exapmle
docker pull {{host}}/coredns/coredns:latest # coredns exapmle