2、 在build 中加入参数解决:
docker build \
--build-arg http_proxy=http://10.188.61.2:8118 \
--build-arg https_proxy=https://10.188.61.2:8118 \
-f Dockerfile . -t imagename:tag
docker build \
--build-arg http_proxy=http://10.188.61.2:8118 \
--build-arg https_proxy=https://10.188.61.2:8118 \
-f Dockerfile . -t imagename
执行Docker build时,有部分需要×××的需求,通过引入http_proxy 解决:
原文:http://blog.51cto.com/devops9527/2324824