-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure npm proxy when proxy environmentals exist #712
Conversation
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.