cloudflare-tunnel
Docker 应用程序 from ProphetSe7en's Repository
概述
Cloudflare Tunnel client with built-in Docker healthcheck.
Identical to the official cloudflare/cloudflared image — the only addition is a HEALTHCHECK instruction using the built-in cloudflared tunnel ready command. No files changed, no packages added, no ports opened.
Why this exists: The official image uses a distroless base with no shell (/bin/sh). Docker's --health-cmd always runs through /bin/sh, so healthchecks added via Extra Parameters will always fail. This image bakes the healthcheck in using exec-form, which bypasses the shell.
Setup:
- Go to Cloudflare Zero Trust dashboard (dash.teams.cloudflare.com)
- Navigate to Networks > Tunnels > Create a tunnel
- Select Cloudflared as connector, give it a name
- Choose Docker as the environment — Cloudflare shows you a token
- Copy the token and paste it in Post Arguments below, replacing YOUR_TUNNEL_TOKEN_HERE
- The TUNNEL_METRICS variable is already set — this is required for the healthcheck
- Start the container — it should show as healthy within 30 seconds
运行时参数
- 网络
bridge- 特权
- false
模板配置
Enables the metrics server inside the container. Required for the healthcheck to work. The port is internal only and not exposed to the host.
- 目标
- TUNNEL_METRICS
- 默认值
- 0.0.0.0:60123
- 价值
- 0.0.0.0:60123
详细信息
ghcr.io/prophetse7en/cloudflare-tunnel:latest在Unraid 上运行 cloudflare-tunnel 。
cloudflare-tunnel 已被列入Unraid OS 的社区应用程序。探索Unraid ,构建灵活的家庭服务器、NAS 或家庭实验室。