https://github.com/night-crawler/tailscale-sidecar
A helper docker-compose sidecar image for tailscale
https://github.com/night-crawler/tailscale-sidecar
docker docker-compose sidecar tailscale
Last synced: about 2 months ago
JSON representation
A helper docker-compose sidecar image for tailscale
- Host: GitHub
- URL: https://github.com/night-crawler/tailscale-sidecar
- Owner: night-crawler
- License: mit
- Created: 2024-01-23T10:56:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-23T11:08:59.000Z (over 2 years ago)
- Last Synced: 2025-01-03T18:21:53.481Z (over 1 year ago)
- Topics: docker, docker-compose, sidecar, tailscale
- Language: Dockerfile
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tailscale-sidecar
Installs the [Tailscale](https://tailscale.com/) client and runs it as a sidecar container in docker compose environments.
## Usage
Let's say you want your tailscale network to be accessible from your prometheus container.
Add the sidecar section to your `docker-compose.yaml`:
```yaml
version: "3"
networks:
monitoring-network:
external: true
nginx-network:
external: true
services:
sidecar:
image: ghcr.io/night-crawler/tailscale-sidecar:main
cap_add:
- NET_ADMIN
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
network_mode: 'service:prometheus'
environment:
TS_AUTHKEY:
TS_HOSTNAME: prometheus-sidecar
TS_LOGIN_SERVER: http://headscale.nginx-network:8080
devices:
- /dev/net/tun
prometheus:
build: ./prometheus
restart: unless-stopped
networks:
- monitoring-network
- nginx-network
volumes:
- ./data/prometheus:/prometheus
```
Exec into the prometheus container and ping some internal host:
```bash
docker compose exec prometheus bash
ping 100.64.0.3
```