I have a Linux machine that happily runs Tailscale and Docker.
I was thinking it would be nice to run Tailscale inside a Docker container, so that the container would get its own unique tailnet hostname, and I could access it without exposing ports on the host.
However, when I start up a Tailscale instance in Docker (compose file below), I see “duplicate node key” for that machine in the Tailscale admin console, and lose access to the host.
What’s the supported approach here?
Thanks!
tailscale:
image: tailscale/tailscale
restart: unless-stopped
hostname: vaultwarden
privileged: true
cap_add:
- NET_ADMIN
command:
- tailscaled
environment:
- AUTHKEY=tskey-...
volumes:
- /var/lib:/var/lib
- /dev/net/tun:/dev/net/tun