Docker: npm install behind proxy

前端 未结 5 1771
粉色の甜心
粉色の甜心 2021-02-04 05:56

I have this Dockerfile:

FROM node:argon

ENV http_proxy http://user:pass@proxy.company.priv:3128
ENV https_proxy https://user:pass@proxy.company.priv:3128

RUN m         


        
5条回答
  •  甜味超标
    2021-02-04 06:17

    As described in the Docker Documentation adding the following to ~/.docker/config.json helped me:

    {
     "proxies":
     {
       "default":
       {
         "httpProxy": "http://127.0.0.1:3001",
         "httpsProxy": "http://127.0.0.1:3001",
         "noProxy": "*.test.example.com,.example2.com"
       }
     }
    }

提交回复
热议问题