要设置加速镜像服务,你可以执行下面命令:
sudo tee /etc/docker/daemon.json <<EOF
{
"registry-mirrors": ["http://docker.jh-go.com"]
}
EOF
如果执行了上述命令,配置了镜像加速服务,可以直接 pull 镜像:
docker pull ubuntu:latest # 拉取 ubuntu 镜像
因为Workers用量有限,在使用加速镜像服务时,你可以手动 pull 镜像然后 re-tag 之后 push 至本地镜像仓库:
docker pull http://docker.jh-go.com/library/ubuntu:latest # 拉取 ubuntu 镜像