Self-Host a Docker Image Proxy Supporting docker.io, ghcr.io, and More
This post was translated from Chinese by AI. If anything reads oddly, the Chinese original is authoritative. 中文原文
github URL: https://github.com/woodchen-ink/docker-image

A Docker image accelerator running on cloudflare workers, designed to work around access issues when pulling official Docker images.
Adapted from: https://github.com/tomwei7/hammal
Usage
Fork & Clone
First, fork the Docker-Image repository and clone it locally
Give it a Star if you can😂
Install dependencies with pnpm install
Create a Workers Project
Go to the Cloudflare Dashboard and create a new Workers project with a name (for example, docker-image)
Copy wrangler.toml.sample to wrangler.toml and update its name and account_id
You can get account_id by running npx wrangler whoami or from the right side of the CF Workers Dashboard
Create a Cache KV Namespace
Run npx wrangler kv:namespace create hammal_cache in the cloned project directory to create a cache KV namespace, note the id in the output, and add it to wrangler.toml
Deploy
Run pnpm run deploy in the cloned project directory to deploy the project
Open your Workers script's dashboard and bind a custom domain to it (required because the default workers.dev domain is blocked in China)
Access
Visit your custom domain directly to see how to use it
Last updated 2025-03-14
Comments 0