How to build Docker Images with Dockerfile behind HTTP_PROXY by Jenkins?

后端 未结 7 1829
终归单人心
终归单人心 2020-12-23 14:54

Building Docker images works in a desktop without a problem. Installing Node.js NPM dependencies work as usual. However, when using a continuous integration server such as J

7条回答
  •  失恋的感觉
    2020-12-23 15:09

    We are doing ...

    ENV http_proxy http://9.9.9.9:9999
    ENV https_proxy http://9.9.9.9:9999
    

    and at end of dockerfile ...

    ENV http_proxy ""
    ENV https_proxy ""
    

    This, for now (until docker introduces build env vars), allows the proxy vars to be used for build without publicly exposing them

提交回复
热议问题