We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker exec -it ${容器ID} /bin/bash
docker pull
在执行docker pull时,是由守护进程dockerd来执行。因此,代理需要配在dockerd的环境中。而这个环境,则是受systemd所管控,因此实际是systemd的配置。
sudo mkdir -p /etc/systemd/system/docker.service.d sudo vim /etc/systemd/system/docker.service.d/proxy.conf
写入以下内容:
[Service] Environment="HTTP_PROXY=http://localhost:7890/" Environment="HTTPS_PROXY=http://localhost:7890/" Environment="NO_PROXY=localhost,127.0.0.1,.noproxy.com"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Docker进入容器:
为
docker pull
添加代理在执行docker pull时,是由守护进程dockerd来执行。因此,代理需要配在dockerd的环境中。而这个环境,则是受systemd所管控,因此实际是systemd的配置。
写入以下内容:
The text was updated successfully, but these errors were encountered: