六花踏雪

六花踏雪

Cloudflare Pages Set Up DockerHub Image Accelerator

Log in to https://dash.cloudflare.com/

Enter Workers

image

Create a Worker

image

image

image

Name it as you like, then click Deploy

image

Edit Code

image

Visit https://github.com/cmliu/CF-Workers-docker.io/blob/main/_worker.js

Copy the Code

image

Replace all the code

image

Click Deploy

image

After refreshing the preview, the search box shows that the deployment was successful

Click Back, then select Settings, and click Add Custom Domain

image

Fill in the Custom Domain and Add Domain

image

Use the command to pull, adding the domain name in front of the official image path

docker pull dockerhub.akapril.in/library/nginx:latest

Set up image acceleration

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://dockerhub.akapril.in"]  # Please replace with your own Worker custom domain
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.