深度阅读

Docker build过程中使用代理

作者
作者
2023年08月22日
更新时间
3.45 分钟
阅读时间
0
阅读量

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

方案一

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

相关标签

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。