默认 · 12月 5, 2021 0

Docker build过程中使用代理

内容纲要

构建镜象过程中如果遇到国外资源,访问特别慢,可以尝试使用代理来解决。

方案一

docker build -t napoler/sim_service $saved_path –build-arg http_proxy=http://127.0.0.1:38573

方案二

You also can set the proxy in the Dockerfile.
ENV http_proxy 10.239.4.80:913

参考资源来自
https://dev.to/zyfa/setup-the-proxy-for-dockerfile-building–4jc8

%d 博主赞过: