dockerfile里面
RUN apt-get update && apt-get install
build的时候比较慢,想在build期间用http代理,用prioxy到127.0.0.1:8118,firefox里面代理可用,但docker build就是不行
google出来github issue里提到, docker版本1.10.3,命令试过下面的写法,都不行。
# docker build --build-arg HTTP_PROXY=http://127.0.0.1:8118 . # docker build --build-arg=[HTTP_PROXY=http://127.0.0.1:8118] .
Each RUN line is run in a temporary container, and the proxy of the host cannot be connected using 127.0.0.1 in the container
It is best to connect to a VPN, which acts as a global proxy and does not require any parameters.
Isn’t it possible to directly set the two environment variables http_proxy and https_proxy?