Accelerating Docker Pull or Docker-compose Pulling Images - GitHub Source

Augmenting Speed for GitHub Docker Sources

Downloading zlib (from GitHub) is quite laborious, as the speed is exceptionally slow.

I came across a remarkable article: Speeding up Docker Pull

Its Purpose

To accelerate GitHub’s docker sources, for instance:

ghcr.io/zlib-searcher/zlib-searcher:latest

ghcr.io/puzzithinker/zlib-searcher:master

How to Use

  1. Configuring http-proxy.conf
1
2
3
4
mkdir -p /etc/systemd/system/docker.service.d
vim /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://192.168.1.1:7890"
  1. Configuring https-proxy.conf
1
2
3
4
vim /etc/systemd/system/docker.service.d/https-proxy.conf
[Service]
Environment="HTTPS_PROXY=http://192.168.1.1:7890"
#This setting is challenging. It took me about half an hour of struggle and constant monitoring of the UI of clash.meta to determine whether the docker pull process was actually utilizing the proxy. Once the settings were correct, the speed indeed skyrocketed in an instant...
  1. Restarting the Service

    1
    2
    sudo systemctl daemon-reload
    sudo systemctl restart docker
  2. Monitoring to Ensure the Proxy Settings are Operative

Related Content

Source of Inspiration

https://zu1k.com/posts/coding/speedup-docker-pull/#Setting-up-a-proxy-for-docker

If the Docker repository for the image source is deleted

1
2
3
4
5
6
7
8
9
10
You will need to save the Docker image as a tar file:

> docker save -o <path for generated tar file> <image name>
Then copy your image to a new system with regular file transfer tools such as cp, scp, or rsync (preferred for big files). After that you will have to load the image into Docker:

> docker load -i <path to image tar file>
You should add filename (not just directory) with -o, for example:

> docker save -o c:/myfile.tar centos:16
PS: You may need to sudo all commands.

https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-using-a-repository