界面预览

img

cloudflare tunnels生成的docker运行程序

1
docker run -d --restart=always cloudflare/cloudflared:latest tunnel --no-autoupdate run --token eyJhIjoiZDZiNmEzN2EwM2EzMzZlODgzYjk4NGZmMmYxMzkyMzIiLCJ0IjoiZGVkZDMyMjktMWM4NS00MDE1LWI3M2QtMjMyOTE0MTcyNmQ0IiwicyWWWWWI6IlpqZzRNbUprWWpNdFpXRXhNaTAwTm1OakxUaGxORFV0WmpnMVkyTTNOMlpoTURJMCJ9

naswwwww.7306923.xyz对应http://10.168.11.133:5000 ,注意不要漏掉端口号

假如运行以上docker运行程序报错,显示不能连接docker仓库的话改为自己的仓库地址docker.cuiewwwww.us.kg去拉取并运行,例如:

1
docker run -d --restart=always docker.cuiewwwww.us.kg/cloudflare/cloudflared:latest tunnel --no-autoupdate run --token eyJhIjoiZDZiNmEzN2EwM2EzMzZlODgzYjk4NGZmMmYxMzkyMzIiLCJ0IjoiZGVkZDMyMjktMWM4NS00MDE1LWI3M2QtMjMyOTE0MTcyNmQ0IiwicyIWWWWW6IlpqZzRNbUprWWpNdFpXRXhNaTAwTm1OakxUaGxORFV0WmpnMVkyTTNOMlpoTURJMCJ9

注意一定要加-d --restart=always来让后台一直运行,或者用-d --restart=unless-stopped

也可以添加--name cloudflared命令来让容器命名为cloudflared

1
docker run --name cloudflared -d --restart=unless-stopped docker.cuiewwwww.us.kg/cloudflare/cloudflared:latest tunnel --no-autoupdate run --token eyJhIjoiZDZiNmEzN2EwM2EzMzZlODgzYjk4NGZmMmYxMzkyMzIiLCJ0IjoiZGVkZDMyMjktMWM4NS00MDE1LWI3M2QtMjMyOTE0MTcyNmQ0IiwicyIWWWWW6IlpqZzRNbUprWWpNdFpXRXhNaTAwTm1OakxUaGxORFV0WmpnMVkyTTNOMlpoTURJMCJ9

以上就是用-d --restart=unless-stopped来实现的后台一直运行