Configure npm proxy when proxy environmentals exist - #712
Conversation
|
@microsoft-github-policy-service agree |
Samruddhi Khandale (samruddhikhandale)
left a comment
There was a problem hiding this comment.
Thanks for contributing this change.
Currently, this PR is automatically setting proxy if the env variables exist. Instead, can we wrap this logic inside a condition on a new Feature option (say useProxyConfig:boolean with default false). This way, the users are willingly enabling it as per their needs, and we won't have to worry about folks raising security concerns.
As per https://docs.docker.com/network/proxy/#configure-the-docker-client, adding proxies to ~/.docker/config.json seems like a manual approach where users are opting into it. So wrapping it inside a Feature option makes sense to me!
These env variables are a kind of standard and almost all programs will use them automatically. If we introduce an additional option for just |
Samruddhi Khandale (samruddhikhandale)
left a comment
There was a problem hiding this comment.
Had a quick chat with the team, turns out the devcontainers/cli supports the automatic support as well. Approving! ✅
PR for issue #702 (Node feature does not pick up proxy settings).
Docker automatically sets up proxy environmentals in the container when configured (see https://docs.docker.com/network/proxy/) so usually everything works without additional configuration. An exception is npm, which does not pick up these environmentals and needs to be configured manually. This PR adds the necessary configuration steps.