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

后端 未结 7 1845
终归单人心
终归单人心 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:03

    Note: Docker 1.9 might help solve this:

    • "Issue 14634": Builder - Build-time argument passing (e.g., HTTP_PROXY)
    • "PR 15182": Support for passing build-time variables in build context

    Usage (proposed):

    docker build --build-arg http_proxy=http://my.proxy.url  --build-arg foo=bar <
    ARG --description="foo's description" foo
    USER $foo
    MARK
    

提交回复
热议问题