Docker使用http加速
Docker使用http加速
国内因为政策原因,无法拉取镜像,这里配置http代理来拉取镜像
- 编辑配置文件
nano /etc/docker/daemon.json
内容如下
{
"proxies": {
"http-proxy": "http://192.168.1.191:1081",
"https-proxy": "http://192.168.1.191:1081"
}
}
- 重启docker服务
systemctl restart docker
- 测试
docker pull hello-world