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

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

    You can use a transparent proxy, as described in:

    https://jpetazzo.github.io/2014/06/17/transparent-squid-proxy-docker/

    docker run --net host jpetazzo/squid-in-a-can
    iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 3129
    

提交回复
热议问题