众所周知的原因docker在国内不能正常使用
今天我在树莓派上安装了docker,需要增加以下配置
/etc/docker/daemon.json
{
"registry-mirrors": [
"https://docker.m.daocloud.io",
"https://hub-mirror.c.163.com"
],
"dns": ["8.8.8.8","1.1.1.1"]
}
8.8.8.8是谷歌的DNS服务
1.1.1.1是cloudflare的DNS服务
然后重启服务
sudo systemctl daemon-reload
sudo systemctl restart docker
测试hello-world
运行一下hello-world
docker run --rm hello-world
//或者拉一下hello-world的镜像
docker image pull hello-world
docker image ls
发表回复
要发表评论,您必须先登录。