Docker download image slow solution
- 2020-06-12 11:28:43
- OfStack
docker solves the problem of slow download images
Use Docker pull to mirror this super slow, because docker's hub is in foreign countries, so it is very slow. Is there any way to solve this problem? The answer is yes, we can use docker agent to solve this problem, you should prepare your own http agent to use.
The proxy Settings
The system used for this article is fedora
Create an docker service directory
mkdir /etc/systemd/system/docker.service.d
Create/etc systemd/system/docker service. d/http - proxy. conf file, ripped agent to write to a file
vim /etc/systemd/system/docker.service.d/http-proxy.conf
The file contents are as follows
[Service]
Environment="HTTP_PROXY=http:// The agent ip: port "
Make the configuration file take effect
systemctl daemon-reload
Restart docker
systemctl restart docker.service
Try pull1 images
docker pull jenkins
Thank you for reading, I hope to help you, thank you for your support to this site!