Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of docker pull being reset

2025-02-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to solve the problem of docker pull being reset. It has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.

For example:

$ docker pull ubuntu:16.04Trying to pull repository docker.io/library/ubuntu ... Get https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:dd7808d8792c9841d0b460122f1acf0a2dd1f56404f8d1e56298048885e45535: Get https://auth.docker.io/token? scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io: read tcp *.*.*.*: 41348->50.17.62.194:443: read: connection reset by peer

Cause: Visual 50.17.62.194 reset by TCP.

Solution:

1. Find its available IP:

$ dig auth.docker.io ; DiG 9.10.4-P6-RedHat-9.10.4-4.P6.fc25 auth.docker.io;; global options: +cmd;; Got answer:;; ->>HEADER /etc/default/docker$ service docker restart

Generally speaking, Netease pork is better than pork on the market.

Option 1: Mirror of ustc

Ustc is an old linux mirroring service provider, and has been in use since the distant ubuntu 5.04 release. Before in the blog mentioned that you can use ustc docker repository mirror, use the method to refer to ustc docker mirror use help.

USTC docker mirror speed is good, has been used quite happy. But today found that it does not work, may have something to do with it, today tried to pull ubuntu, very slow, should be directly to the docker hub to pull up, basically no acceleration effect.

One of the advantages of ustc docker mirror is that it does not require registration, public service (this is the ustc I am familiar with).

Option 2: daocloud

DaoCloud also offers docker accelerators, but unlike ustc, users need to register to use them, and traffic is limited to 10GB per month. Linux is easy to use, one command to do:

curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://{your_id}.m.daocloud.io

The actual change is/usr/lib/systemd/system/docker.service, adding a-registry-mirror parameter:

ExecStart=/usr/bin/docker-current daemon --registry-mirror=http://{your_id}.m.daocloud.io\

After setup, reload configuration & restart is required:

systemctl enable docker; systemctl daemon-reload ; systemctl restart docker

But! Today, the experience of using DaoCloud docker accelerator is very poor, the acceleration effect is basically not felt, decisively give up.

Option 3: Alcoloud

Alibaba Cloud also provides docker accelerators, but it is more troublesome than ustc: not only to register as Alibaba Cloud users, but also to join the developer platform. However, after pinching my nose last night, its service is really good, basically 1MB/s pull speed (partly because I am also in Hangzhou). The configuration method is similar to daocloud, which also gives a url after opening the accelerator.

I went directly to/usr/lib/systemd/system/docker.service and changed it:

ExecStart=/usr/bin/docker-current daemon --registry-mirror=https://{your_id}.mirror.aliyuncs.com\

Reload Configuration & Restart:

systemctl enable docker; systemctl daemon-reload ; systemctl restart docker

Pull still shows docker.io, but speed is not docker.io at all.

# docker pull ubuntuUsing default tag: latestTrying to pull repository docker.io/library/ubuntu ... latest: Pulling from docker.io/library/ubuntucad964aed91d: Pull complete3a80a22fea63: Pull complete50de990d7957: Pull complete61e032b8f2cb: Pull complete9f03ce1741bf: Pull completeDigest: sha256:28d4c5234db8d5a634d5e621c363d900f8f241240ee0a6a978784c978fe9c737Status: Downloaded newer image for docker.io/ubuntu:latest

To sum up, although aliyun docker mirror has this kind of discomfort, it is indeed the best service at present. Of course, when ustc returns to normal, I will still switch to ustc.

Thank you for reading this article carefully. I hope that the article "How to solve the problem of docker pull being reset" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report