Skip to content

Instantly share code, notes, and snippets.

@wbmins
Last active May 3, 2025 05:26
Show Gist options
  • Save wbmins/2923f9529f7e620de732f73bc646e5c7 to your computer and use it in GitHub Desktop.
Save wbmins/2923f9529f7e620de732f73bc646e5c7 to your computer and use it in GitHub Desktop.
docker 设置代理
# 1.创建文件
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo vim /etc/systemd/system/docker.service.d/http-proxy.conf
# 2.文件内容如下
[Service]
Environment="HTTP_PROXY=http://127.0.0.1:8123"
Environment="HTTPS_PROXY=http://127.0.0.1:8123"
# 3.重启服务
sudo systemctl daemon-reload
sudo systemctl restart docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment