设置客户端代理
修改~/.docker/config.json 文件
{
……
"proxies":
{
"default":
{
"httpProxy": "http://127.0.0.1:3001",
"httpsProxy": "http://127.0.0.1:3001",
"noProxy": "*.test.example.com,.example2.com"
}
}
}
修改docker 服务配置
/lib/systemd/system/docker.service
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
Environment=HTTP_PROXY=http://xxx.com:xxx
Environment=HTTPS_PROXY=http://xxx.com:xxx
Environment=NO_PROXY=*.xxx.com
转自: