The error log

    Error response from daemon: Head https://registry-1.docker.io/v2/library/nginx/manifests/latest: Get https://auth.docker.io/token? The scope = repository % 3 alibrary % 2 fnginx % 3 apull & service = registry. The docker. IO: read the TCP 172. *. *. * : 60724 - > 34.231.251.252:443: read: connection reset by peer
Copy the code

Solution: Use Aliyun accelerator

1, first enter the ali cloud docker library www.aliyun.com/product/kub…

2. Register an account and enter the console for management;

3. Select the Mirror Accelerator option.

4, enter the mirror accelerator option, you can see your accelerator address, you can modify according to the prompt modification steps, accelerate

5, first modify the file “/etc/dock/daemon. json” (if you do not have this file, you can manually create an empty file)

The following commands are executed in sequence: sudo mkdir -p /etc/docker # create directory # Add the following file contents to the specified directory: sudo tee /etc/docker/daemon.json <<-'EOF'
    {
      "registry-mirrors": ["https://xxxxx.xxxxx.aliyuncs.com"]} EOF systemctl daemon-reload sudo systemctl restart dockerCopy the code

6. Re-pull the mirror to test the accelerator effect