Docker: npm install behind proxy

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

    (Just that you know, this package was written by myself)

    You can use docker-container-proxy, it allows configuration of a proxy for any docker container without editing any code.

    Just run:

    npx dockerproxy start --address company-proxy-address.com --port 8080
    # Do anything else that needs a Proxy
    

提交回复
热议问题