修改 /etc/docker/daemon.json 文件,添加 proxies.{http-proxy,https-proxy},下面是一个示例。
{
"proxies": {
"http-proxy": "http://name:passwd@192.168.6.2:7890",
"https-proxy": "http://name:passwd@192.168.6.2:7890",
"no-proxy": "*.test.example.com,.example.org,127.0.0.0/8,192.168.0.0/16"
}
}上面是配置 docker 拉取镜像时,设置旁路由(openwrt + openclash)为代理服务器的配置。