Files
cloudflare-docker-proxy/README.md
2025-11-15 21:32:44 -07:00

50 lines
2.0 KiB
Markdown

# cloudflare-docker-proxy
> ### ⚠️ **Important Notice**
> <span style="color:#d73a49;font-weight:bold">Docker Hub is rate-limiting Cloudflare Worker IPs, causing frequent <code>429</code> errors.</span>
> <span style="color:#d73a49;font-weight:bold">This project is currently NOT recommended for production use.</span>
Due to the current instability, this project is not recommended for production use.
We will provide updates as soon as more information becomes available.
![deploy](https://github.com/ciiiii/cloudflare-docker-proxy/actions/workflows/deploy.yaml/badge.svg)
[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/ciiiii/cloudflare-docker-proxy)
> If you're looking for proxy for helm, maybe you can try [cloudflare-helm-proxy](https://github.com/ciiiii/cloudflare-helm-proxy).
## Deploy
1. click the "Deploy With Workers" button
2. follow the instructions to fork and deploy
3. update routes as you requirement
[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/ciiiii/cloudflare-docker-proxy)
## Routes configuration tutorial
1. use cloudflare worker host: only support proxy one registry
```javascript
const routes = {
"${workername}.${username}.workers.dev/": "https://registry-1.docker.io",
};
```
2. use custom domain: support proxy multiple registries route by host
- host your domain DNS on cloudflare
- add `A` record of xxx.example.com to `192.0.2.1`
- deploy this project to cloudflare workers
- add `xxx.example.com/*` to HTTP routes of workers
- add more records and modify the config as you need
```javascript
const routes = {
"docker.libcuda.so": "https://registry-1.docker.io",
"quay.libcuda.so": "https://quay.io",
"gcr.libcuda.so": "https://k8s.gcr.io",
"k8s-gcr.libcuda.so": "https://k8s.gcr.io",
"ghcr.libcuda.so": "https://ghcr.io",
};
```