Rate This Document
Findability
Accuracy
Completeness
Readability

Pulling Docker Images Is Too Slow or Times Out

Symptom

Pulling Docker images is slow or times out.

Key Process and Cause Analysis

By default, the Docker image download address is outside China. You need to configure an image source in China.

Conclusion and Solution

  1. Configure an image source in China.
    vi /etc/docker/daemon.json

    Add the image source information to /etc/docker/daemon.json. The following is an example:

    {
        "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
    }
    1. If the /etc/docker/daemon.json file does not exist, create it manually.
    2. In this example, the USTC image source is used. You can also configure other image sources as required.
  2. Restart the Docker service.
    systemctl restart docker