Docker: npm install behind proxy

前端 未结 5 1726
粉色の甜心
粉色の甜心 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:26

    Adding this to Dockerfile worked for me:

    RUN npm config set https-proxy http://user:password@proxy.company.priv:80
    RUN npm config set proxy http://user:password@proxy.company.priv:80
    

提交回复
热议问题