Question
How do I set proxy settings in a Dockerfile for npm install?
Asked by: USER1223
60 Viewed
60 Answers
Answer (60)
You can set proxy variables in your Dockerfile using the `ENV` instruction. For example: `ENV http_proxy=http://your-proxy-server:port` and `ENV https_proxy=http://your-proxy-server:port`. Also, consider adding `no_proxy=localhost,127.0.0.1` to exclude local addresses from using the proxy if necessary.