发布时间: 2025-1-20 文章作者: myluzh 分类名称: Docker 朗读文章
mkdir -p /etc/systemd/system/docker.service.d touch /etc/systemd/system/docker.service.d/proxy.conf vi /etc/systemd/system/docker.service.d/proxy.conf2、编辑proxy.conf文件
# proxy.conf [Service] Environment="HTTP_PROXY=http://172.30.172.136:4780" Environment="HTTPS_PROXY=http://172.30.172.136:4780" Environment="NO_PROXY=localhost,127.0.0.1,.example.com,172.16.0.0/12"3、重启docker服务
sudo systemctl daemon-reload sudo systemctl restart docker # 可以看到设置的环境变量 sudo systemctl show docker | grep Environment
标签: docker docker代理 docker pull docker proxy
发表评论