auto start tailscale with derper
1.7K
这个 Docker 容器在同一个容器中运行 Tailscale 的 tailscaled 服务、tailscale 服务以及 derper 服务。它使用 supervisord 来管理和监控这三个服务的运行状态。
docker build -t tailscale-derp .
docker run -d \
-p 80:80 \
-p 443:443 \
-p 3478:3478/udp \
-p 41641:41641/udp \
-e TAILSCALE_AUTH_KEY=your_auth_key \
-e DERP_HOSTNAME=your_derper_hostname \
tailscale-derp
替换 your_auth_key 和 your_derper_hostname 为你自己的值。
下表解释了可以传入的环境变量及其含义:
| 变量名 | 默认值 | 描述 |
|---|---|---|
| TAILSCALE_AUTH_KEY | - | Tailscale 的认证密钥,用于连接到你的 Tailnet |
| TAILSCALE_ACCEPT_ROUTES | true | 是否接受来自 Tailnet 的路由 |
| TAILSCALE_ACCEPT_DNS | true | 是否接受来自 Tailnet 的 DNS 设置 |
| DERP_HOSTNAME | - | DERP 服务器的主机名 |
| DERP_LISTEN_ADDRESS | :443 | DERP 服务器的监听地址 |
| DERP_VERIFY_CLIENTS | true | 是否验证连接到 DERP 服务器的客户端 |
容器暴露了以下端口:
容器使用 supervisord 来管理和监控 tailscaled、tailscale 和 derper 服务。supervisord 配置文件位于 /etc/supervisor/conf.d/supervisord.conf。
entrypoint.sh 脚本是容器的入口点。它创建 DERP 服务器的证书目录,然后启动 supervisord。如果在运行 docker 容器时提供了命令行参数,则执行这些参数,否则启动 supervisord。
Content type
Image
Digest
sha256:f17e5c410…
Size
46.3 MB
Last updated
over 2 years ago
docker pull 5200710/tailscale