在运行容器时添加全局代理相关的参数即可。
Docker命令中添加:
--env HTTP_PROXY="http://172.16.0.102:1081" \
--env HTTPS_PROXY="http://172.16.0.102:1081" \
--env http_proxy="http://172.16.0.102:1081" \
--env https_proxy="http://172.16.0.102:1081" \
Unraid中,在创建容器时,[高级视图]-[额外参数]中添加一行:
--env HTTP_PROXY="http://172.16.0.102:1081" --env HTTPS_PROXY="http://172.16.0.102:1081" --env http_proxy="http://172.16.0.102:1081" --env https_proxy="http://172.16.0.102:1081"