explaingit

cmliu/cf-workers-docker.io

9,214JavaScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A Cloudflare Workers-based proxy that lets you pull Docker container images through your own custom domain, bypassing regional access restrictions to Docker Hub.

Mindmap

mindmap
  root((repo))
    What it does
      Proxies Docker Hub
      Bypasses restrictions
      Custom domain mirror
    Deployment
      Cloudflare Workers
      Cloudflare Pages
      One-click fork
    Usage
      Prefix image name
      Registry mirror config
    Risks
      ToS considerations
      Third-party mirrors list
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Set up a personal Docker Hub mirror on your custom domain to bypass regional access restrictions.

USE CASE 2

Configure the Docker daemon to automatically route all image pulls through your proxy without changing pull commands.

USE CASE 3

Deploy a serverless Docker registry proxy in minutes by pasting a single JavaScript file into the Cloudflare dashboard.

Tech stack

JavaScriptCloudflare Workers

Getting it running

Difficulty · easy Time to first run · 30min

Requires a Cloudflare account, proxying traffic this way may conflict with Cloudflare's terms of service.

In plain English

This project is a proxy tool for Docker Hub, the main public registry where developers download container images. It runs on Cloudflare Workers, a serverless platform, and acts as a relay between your server and Docker Hub. The purpose is to work around access restrictions that prevent some users from reaching Docker Hub directly. Deployment is done through Cloudflare, either as a Worker (by pasting a single JavaScript file into the Cloudflare dashboard) or as a Pages project (by forking the repository and connecting it to your Cloudflare account with one click). After deployment, your custom domain becomes a Docker registry mirror. Once the proxy is running, you can use it in two ways. The first is to prefix the image name you want to pull with your custom domain, for example typing your domain in front of a standard Docker pull command. The second is to set your custom domain as a registry mirror in Docker's configuration file, so all pulls automatically route through it without changing your commands. The README notes that using this kind of proxy service carries risks under Cloudflare's terms of service, since proxying traffic in this way resembles a VPN or similar service. Users are advised to weigh that risk themselves. The README also lists several third-party DockerHub mirror services maintained by others, as a reference, though it states no security verification has been done on those. The repository is written in JavaScript and is intended for developers who are comfortable with basic server configuration and Cloudflare account management.

Copy-paste prompts

Prompt 1
I've deployed cf-workers-docker.io on my Cloudflare Worker at mirror.example.com. Show me how to configure /etc/docker/daemon.json to use it as a registry mirror so all docker pull commands route through it automatically.
Prompt 2
Walk me through deploying cf-workers-docker.io as a Cloudflare Pages project by forking the repo, what do I connect in the Cloudflare dashboard and what env vars do I need?
Prompt 3
I want to pull the nginx image through my cf-workers-docker.io proxy at mirror.example.com. Show me the exact docker pull command using the domain-prefix method.
Open on GitHub → Explain another repo

← cmliu on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.