Today, on the last day of the Tomb Sweeping Day holiday, it is almost raining intermittently. "It rains in succession during the Tomb Sweeping Day, and pedestrians on the road want to die". The ancient people summed up this sentence too well, so stay at home today and take some time to update the online self built services. The main fear is that the security issues involved are not updated in time. Most services are deployed through dockers, After checking the official update progress of the service, all the updated ones that have been stable for more than 2 weeks have been updated to the latest version.

Composition

So I started to backup - change the version number - upgrade a set of combination operations. I found that when I pulled the Docker image, it was very slow, and it was very fast in the past. I used the Docker image source every time, so I should not pull it several times in succession and fail. So I started to check whether the image address was unavailable. When I opened the first one, the page prompted the information {"message":"docker.mirrors.ustc.edu.cn is currently USTCnet-only","ip":"182.xx.xx.xx"} , I can see the docker configuration file directly /etc/docker/daemon.json , there are three image addresses in it. Unexpectedly, it was pulled from the original foreign site, and one of them is a customized image source of Alibaba Cloud. I also went to see it (I found that Alibaba Cloud has modified some protocols this time, and I have to agree without looking carefully. After all, I have to agree if I don't agree!!! It may have something to do with the instability of Alibaba Cloud services. It is estimated that the agreement agreed this time is to write something for users, I guess Aliyun Legal Department don't come to Yin and Yang I hahahaha), log in and directly find the container image service - image tool - accelerator address, and find that it has not changed, but there is a line of prompts above, "Due to the network problem of the current operator, you may be slow in pulling the Docker Hub image. It is recommended that you manually pull the image to the local node, and then restart the Pod. You can also upload the image to ACR or use the subscription overseas source image function, and then pull the corresponding image from ACR." The simple translation is that you may fail to pull. I think there was a leak in this address before. It is estimated that someone directly copied my image when they did not have brains to configure it, which led to frequent final failures. I also guess that there is a 163 image configured at the end. I don't know why.

There are too many words. To sum up briefly, there are few commercially stable image sources available in China, and three of them are equipped with rollover cars. So we started to check the experience of the big guys in various forums again, and then summarize a wave of the latest available ones. I won't believe it if we do more this time!!!

After searching for a circle, most of them still have to build their own images, but Docker images are usually dozens of megabytes and heavily depend on bandwidth. Give up building your own images!!!

Finally, I found some useful mirror stations, most of which are maintained by colleges and universities. To be honest, enterprises should build their own mirror stations. Self maintenance is convenient, and heavy reliance on college mirror stations may often lead to network cutover, network jitter, disk expansion and other problems that lead to instability. What's more, school maintenance is certainly not as timely as enterprise maintenance, It is estimated that if it fails, it will be updated only when someone gives feedback. The imperfect monitoring system is a problem.

Some available images: Welcome to leave a message in the comment area and contribute your image

 Shanghai Jiaotong University: https://docker.mirrors.sjtug.sjtu.edu.cn daocloud: https://docker.m.daocloud.io Baidu: https://mirror.baidubce.com Tencent Intranet only: https://mirror.ccs.tencentyun.com Nanjing University: https://docker.nju.edu.cn dockerproxy: https://dockerproxy.com

Quick configuration

 sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": [ " https://docker.mirrors.sjtug.sjtu.edu.cn ", " https://docker.m.daocloud.io ", " https://mirror.baidubce.com ", " https://docker.nju.edu.cn ", " https://dockerproxy.com ", " https://mirror.ccs.tencentyun.com " ] } EOF sudo systemctl daemon-reload sudo systemctl restart docker

antic

For some images, cache will be generated if the official maintenance is not timely. For example, pulling latest is a previous version, so it is recommended to pull the image according to the specific version number. If the image is not pulled, an error will be reported directly, instead of directly pulling the cache version several months ago, the problem has not been found, or compare it with the official docker hub to see if it is correct.

Reference link

Configure Image Accelerator _Container Image Service (ACR) - AliCloud Help Center
Docker Proxy image acceleration
GitHub - y0ngb1n/dockerized: 🐳 Build once, run anywhere
GitHub - DaoCloud/public image mirror: Many images are abroad. For example, gcr. Domestic downloads are slow and need to be accelerated.
Docker Hub | e-Science Document
MirrorZ.org

Article Contents