Log in to https://dash.cloudflare.com/
Enter Workers
Create a Worker
Name it as you like, then click Deploy
Edit Code
Visit https://github.com/cmliu/CF-Workers-docker.io/blob/main/_worker.js
Copy the Code
Replace all the code
Click Deploy
After refreshing the preview, the search box shows that the deployment was successful
Click Back, then select Settings, and click Add Custom Domain
Fill in the Custom Domain and Add Domain
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