如果你的开发环境在代理后面,你可以通过以下方式在 Visual Studio Code Dev Container 中使用代理。
"env": {
"HTTP_PROXY": "http://proxy-server:port",
"HTTPS_PROXY": "http://proxy-server:port",
"NO_PROXY": "localhost,127.0.0.1,*.local"
在容器内部使用代理。例如,如果你使用 apt-get,请在容器内执行以下命令:
export HTTP_PROXY=http://proxy-server:port
export HTTPS_PROXY=http://proxy-server:port
这是我能提供的信息。