Why 21YunBox Pricing Contact Log in
Talk to an expert Test your site in China

Does Docker Hub Work in China? Data Residency, ICP & Cross-Border Rules

Your private Docker Hub images bake proprietary code into their layers and often embed credentials and tokens; on Docker Hub's hosted registry they sit offshore — a data-residency and PIPL cross-border question, not a reachability one. Self-hosting a private registry in-country keeps them resident.

Does Docker Hub work in China?

Whether you can use Docker Hub in mainland China is a private-image residency and software-supply-chain question, not a reachability one. A container image is an artifact that bakes your proprietary code into its layers, and private images routinely embed credentials, API tokens and build configuration — your private repositories concentrate that intellectual property and those secrets in one place.

In Docker's own documentation, Docker Hub is “the world's largest container registry for storing, managing, and sharing Docker images,” and it lists “Private repositories” among its key features. That single hosted registry runs on offshore infrastructure with no mainland-China region (confirm current with Docker), so your private images and the secrets baked into them sit abroad, and your China deployment's image supply chain — what runs in the mainland, with what provenance — crosses the border. That is a cross-border transfer and data-localization question under PIPL before it is a connectivity one.

This is a risk map, not a verdict — your obligations turn on what your images carry and your role. Our China team can map your Docker Hub exposure with you →

What Docker Hub's own documentation says about China

FactPrimary source
In Docker's own documentation: Docker Hub is “the world's largest container registry for storing, managing, and sharing Docker images,” and lists “Private repositories” among its key features — a single, offshore-hosted registry, with no mainland-China region for your private repos (confirm current with Docker). Docker Docs — Overview (Docker Hub), retrieved 2026-10-13
A self-hosted private registry is a genuine in-country path: Harbor is an open-source registry you install on your own Kubernetes or Docker host, and Nexus or Artifactory run inside your own infrastructure — keeping private images, build artifacts and embedded secrets resident where you run them. Harbor project (goharbor.io), retrieved 2026-10-13
China's Cybersecurity Law requires personal information and important data collected or generated in the mainland to be stored in-country — Article 39 (formerly Article 37), as renumbered by the 2025 amendment in force 2026-01-01. An offshore registry holding your private images and build metadata has no mainland footing to satisfy that for a CIIO or large-volume handler. Cybersecurity Law of the PRC, Article 39 (formerly Article 37); retrieved 2026-10-13
Publisher identities, access logs and any personal data inside private images or build metadata, held offshore, are a cross-border transfer under the Personal Information Protection Law (Articles 38–40): notice, a separate consent, and one transfer mechanism — a CAC security assessment, the standard contract, or certification. Personal Information Protection Law of the PRC, Articles 38–40; retrieved 2026-10-13

Sources verified by the 21YunBox compliance team on 2026-10-13.

For a mainland-China deployment, the deciding question about Docker Hub is not whether a node in Shanghai can pull a public base image — it is where your private images live, what they carry, and on what legal basis they got there. Pulling community base images is a reachability topic, and a registry mirror or cache can speed it; it is not the part that decides whether your setup is defensible. Your private repositories are different. A container image is an artifact that bakes your proprietary code, dependencies and build output into its layers, and private images routinely embed build credentials, API tokens, configuration and sometimes data. Held on Docker Hub’s hosted registry, that concentrated intellectual property and those secrets sit offshore, and your China deployment’s image supply chain — what runs in the mainland, built from what, with what provenance and integrity — crosses the border. Residency and cross-border transfer, not pull latency, are what decide this.

Docker's official documentation overview page describing Docker Hub as the world's largest container registry for storing, managing, and sharing Docker images, and listing Private repositories among its key features — confirming your private images are held on Docker's own hosted registry
Docker's own documentation describes Docker Hub as “the world's largest container registry for storing, managing, and sharing Docker images,” and lists “Private repositories” among its key features. That single hosted registry is Docker's offshore service — which is why residency, not reachability, is the question for your private images. Source: Docker Docs — Overview (Docker Hub)

Does Docker Hub work in China? At a glance

What decides it What it means for mainland China
What your private images hold A container image bakes your proprietary code, dependencies and build output into its layers; private images routinely embed build credentials, API tokens, configuration and sometimes data.
Where the registry runs Private repositories live on Docker Hub's hosted registry, which runs on offshore infrastructure. Docker publishes no mainland-China region for Docker Hub (confirm current with Docker).
Data residency For a CIIO or large-volume handler, personal information and important data collected in China must be stored in the mainland (Cybersecurity Law Article 39 (formerly Article 37)) — a duty an offshore registry cannot meet.
Cross-border transfer Publisher identities, access logs and any personal data inside private images or build metadata, held offshore, are a PIPL cross-border transfer (Articles 38–40): notice, a separate consent, and one transfer mechanism.
Your deployment's supply chain A China deployment that pulls from an offshore registry runs its image supply chain across the border. A registry mirror or cache speeds public pulls — it does not move your private images or secrets in-country.
The residency lever A self-hosted private registry (Harbor, or Nexus / Artifactory in your own infrastructure) run inside the mainland keeps the private images, build artifacts and embedded secrets resident.

Door one — your private images are proprietary code, and residency follows where they’re hosted

Start with what the registry holds, because that is what China’s law answers to. The public side of Docker Hub serves community base images, but that is not the part that decides this. Your private repositories are the authoritative store of images you do not share with the world — and a container image is not just a download target: it is an artifact that bakes your proprietary code, dependencies and build output into its layers, a concentrated slice of your intellectual property. Docker’s own documentation describes Docker Hub as “the world’s largest container registry for storing, managing, and sharing Docker images,” with “Private repositories” among its key features — a single, hosted registry running on offshore infrastructure, with no mainland-China region for your private repos (worth confirming with Docker rather than assuming). If you are a critical information infrastructure operator, or you handle personal information at volume, personal information and important data collected and generated in China must be stored in the mainland, with a security assessment before any export — the Cybersecurity Law data-localization rule, Article 39 (formerly Article 37) as renumbered by the 2025 amendment in force 2026-01-01. An offshore registry holding your private images and the secrets baked into them has no mainland footing to satisfy that.

Door two — embedded secrets, image provenance and your deployment’s supply chain

The second door is PIPL and the integrity of what actually runs in the mainland. Private images and the pipeline around them carry more than application code: build credentials, API tokens, registry auth and configuration baked into layers, plus the usernames and email addresses of whoever pushed, built and promoted a tag, and access logs — with the occasional personal record riding along in a layer or fixture. Under the Personal Information Protection Law, holding that data on infrastructure outside the mainland is a cross-border transfer (Articles 38–40): the handler must give notice, obtain a separate consent for the transfer, and clear one mechanism — a CAC security assessment, the CAC standard contract, or certification. Trimming the secrets and personal data that get baked into images in the first place is part of the fix, but it does not move the store on its own. And because your China deployment pulls its images from wherever the registry runs, the provenance and integrity of what executes in the mainland — which image, built from what, signed by whom — are governed across the border too: a software-supply-chain exposure a connectivity check never surfaces.

Why a reachability check misses this

A “can my node pull an image from Shanghai” test answers the wrong question. A registry mirror or cache, or connectivity tuning, changes how fast and how reliably a public image resolves — it does not change where your private images, the secrets baked into their layers, and the provenance of what you ship actually live. So a cluster can look perfectly healthy from inside China while every private image, every token embedded in it, and every publisher record still sits offshore. The residency and cross-border questions above are invisible to a reachability probe precisely because the images keep pulling — which is why the move that matters is moving the private registry in-country, not making the offshore one merely reachable or mirrored. We publish no first-party measurement of Docker Hub connectivity from inside China, so we put no figures here; it is something we would measure against your actual setup rather than assert.

This is a risk map, not a verdict: whether you need in-country storage, a transfer mechanism, a reworked consent flow, an ICP filing for any public-facing developer or image portal, or some combination depends on what your private images carry, how much, and who your publishers are — worth settling with counsel before you build.

The lever — map, localize, deliver

Because a genuine self-hosted private registry exists for Docker images, there is a real in-country path, and 21YunBox never uses or suggests circumvention of any kind.

  • Map — inventory which images are private (your proprietary code), whether they embed credentials, tokens or configuration, where the registry and any cluster control-plane live today, the residency basis, and how your China deployment’s image supply chain crosses the border.
  • Localize / govern — run the private registry in-country (self-hosted — Harbor, or Nexus / Artifactory in your own infrastructure), so the proprietary images and embedded secrets stay resident; keep your China deployment’s image supply chain in-country; and minimize what crosses the border.
  • Deliver — put a compliant, in-country private registry and image delivery in front of (or in place of) the offshore service; 21YunBox stands up the in-country layer without a rebuild.

Making the public registry merely reachable or mirrored is not the answer — your private images and secrets are still offshore, and pulling public base images faster does not change that. Keeping the private registry and your images in-country is.

Where 21YunBox fits — a compliant overlay, not a migration

You keep using Docker and your existing workflow. We add the piece an offshore registry cannot provide on its own: a lawful, in-country home for a self-hosted private registry, so your proprietary images, build artifacts and embedded secrets stay resident where the law requires, with compliant ICP-filed delivery for the developer access and any public-facing image portal in front of it — placed around your existing setup, with no rebuild, no second codebase, and no migration off Docker Hub. As a partner to the toolchain you already run, our China team maps your PIPL cross-border, consent and data-residency obligations against your entity and your pipeline, then stands up the in-country registry and delivery a defensible China presence needs. We never use or suggest circumvention of any kind.

Get a compliance assessment →


Related reading:

Frequently Asked Questions

Is this about whether I can pull images from Docker Hub in China?
No. Pulling public base images is a reachability topic, and a registry mirror or cache can speed it. What decides compliance is where your private images and the secrets baked into their layers live, and whether your China deployment's image supply chain crosses the border — none of which a reachability check can see.
Does Docker Hub have a mainland-China region for private repositories?
We find no mainland-China region for Docker Hub; it is a single, offshore-hosted registry (confirm current with Docker). Public-image mirrors exist in China, but a mirror of public images does not move your private images or embedded secrets in-country.
What keeps my private images and secrets resident in China?
A self-hosted private registry run inside the mainland — Harbor, or Nexus / Artifactory in your own infrastructure — keeps private images, build artifacts and embedded secrets resident. 21YunBox stands up that in-country registry and compliant ICP-filed delivery around your existing setup, with no rebuild and no migration off Docker Hub.

ARTICLES RELATED TO DOCKER HUB

CATEGORIES

DevOps

Make Your Site Work inside the Great Firewall of China

Enter your information, and our staff will assist you in getting a 21YunBox account for China.

Make Your Site Work Within the Great Firewall of China
Make Your Site Work Within the Great Firewall of China

By clicking 'Get Started', I also agree to 21YunBox's Terms of Service and Privacy Policy.