From 66b423853a25ee075f173b3d2400c8b9e73f00d5 Mon Sep 17 00:00:00 2001 From: ciiiii Date: Tue, 22 Mar 2022 02:59:09 +0800 Subject: [PATCH] update README --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..bcdfd5b --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# cloudflare-docker-proxy + +![deploy](https://github.com/ciiiii/cloudflare-docker-proxy/actions/workflows/deploy.yaml/badge.svg) + +## Config 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", + "ghcr.libcuda.so": "https://ghcr.io", + }; + ``` + +## Deploy +[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/ciiiii/cloudflare-docker-proxy) + +1. fork this project +2. modify the link of the above button to your fork url +3. click the button, you will be redirected to the deploy page \ No newline at end of file