Cloud Native 6 min read

Docker Pull Timeout? Stop Copy‑Pasting Configs – 3 Tested Mirrors and a Pitfall‑Avoidance Guide

The article explains why Docker image pulls often time out in China due to outdated or unreachable registry mirrors, lists common invalid mirror configurations, and provides three verified mirror URLs for 2025 together with step‑by‑step setup instructions and practical troubleshooting tips.

Java Companion
Java Companion
Java Companion
Docker Pull Timeout? Stop Copy‑Pasting Configs – 3 Tested Mirrors and a Pitfall‑Avoidance Guide

Why Docker Pulls Time Out

On a server the author repeatedly encountered timeout errors when pulling Docker images. The default Docker registry is hosted abroad, making network latency and occasional outages common in China. The usual remedy is to replace the default registry with a domestic mirror, but many publicly shared configurations are stale or incorrect.

Common Invalid Mirror Configurations

Typical "Docker 国内镜像源" JSON snippets found online include entries such as:

{
  "registry-mirrors": [
    "https://docker.1panelproxy.com",
    "https://2m11665s.mirror.aliyuncs.com",
    "https://registry.docker-cn.com",
    "https://dockerhub.azk8s.cn",
    "https://docker.mirrors.ustc.edu.cn",
    "http://hub-mirror.c.163.com",
    "https://k8s.gcr.io",
    "https://github-releases.githubusercontent.com",
    "https://ustc-edu-cn.mirror.aliyuncs.com"
  ],
  "insecure-registries": [
    "registry.me:5000",
    "http://docker.mirrors.ustc.edu.cn",
    "https://k8s.gcr.io",
    "https://github-releases.githubusercontent.com",
    "https://registry-1.docker.io",
    "decs.com"
  ],
  "exec-opts": ["native.cgroupdriver=systemd"]
}

Running ping against most of these domains shows they no longer resolve, and some tutorials even suggest switching DNS to Google’s 8.8.8.8, which worsens connectivity in the local network.

Three Verified Mirrors (2025)

Using an AI assistant, the author discovered three mirrors that are currently reachable and provide megabyte‑per‑second pull speeds:

{
  "registry-mirrors": [
    "https://docker.1ms.run",   // fastest, millisecond mirror (recommended)
    "https://dockerproxy.com", // stable proxy with good compatibility
    "https://hub.rat.dev"      // fallback when the first fails
  ]
}

Configuration Steps

Edit Docker's daemon file: vim /etc/docker/daemon.json Replace the content with the JSON shown above.

Reload and restart Docker: systemctl daemon-reload && systemctl restart docker Test the setup: docker pull hello-world – a quick pull confirms success.

Three Hard‑Earned Lessons

Analyze the problem before copying solutions. Identify whether a timeout stems from network issues, mirror unavailability, or permission errors.

Validate the freshness of any solution. Mirror URLs can become obsolete within months; prioritize results published within the last year.

Use AI for efficiency, but verify its output. The AI suggested the three mirrors, yet each still needed a ping test to confirm reachability.

Three Practical Tips to Speed Up Troubleshooting

Quickly check if a domain resolves: ping docker.1ms.run. A reply means the host is reachable.

Verify a mirror can actually serve images: docker pull docker.1ms.run/hello-world. Successful pull confirms usability.

When editing daemon.json, use dd in vim to delete whole lines efficiently (press i to edit, Esc then :wq to save).

DockerTroubleshootingnetwork timeoutdaemon.jsonregistry-mirrors
Java Companion
Written by

Java Companion

A highly professional Java public account

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.