docker代理设置
docker代理设置
docker pull 代理设置
step1:修改docker配置文件
1
2
sudo vim /etc/systemd/system/docker.service.d/http-proxy.conf
修改内容如下:
1
2
3
[Service]
Environment="HTTP_PROXY=http://ip:7890"
Environment="HTTPS_PROXY=http://ip:7890"
ip为宿主机的ip,在每次ip更改时都需要修改。
step2:重启docker
1
2
sudo systemctl daemon-reload
sudo systemctl restart docker
This post is licensed under CC BY 4.0 by the author.