Well that was an interesting lesson with #Tailscale MagicDNS and Docker-Compose.. not all abstractions are fun folks..

#homelab #selfhosting #selfhosted #tailscale #MagicDNS

@train Please go on …
@bplein I'm not sure I can properly explain but here it goes. I'm trying to move my #homepage installation to a docker container. All of my services find each other by tailnet dns. However, it looks like using magic dns inside of a container to lookup tailnet dns doesn't work. I had to specially set dns: 100.100.100.100 for homepage to discover my services via my tailnet. However, that breaks DNS for everything else. Feels wrong! but works.

@train I’m not sure I follow 100% but docker has its own sense of name resolution that takes precedence over host DNS. Layering in MagicDNS… not sure I know the precedence at that point.

Have you reached out to the folks at Tailscale?

@train I love the docker-compose + Tailscale workflow.
@davidvasandani How do you get magic dns to work inside the container? I can't look up any MagicDNS addresses from within the container. It just keeps saying bad address.
@train I’ll get you a working docker-compose example after the kids are in bed. 🤣
@davidvasandani Or!! you can get the kids to make a working compose example!!! 🤣! All good no worries.
docker-compose + tailscale (n8n example)

docker-compose + tailscale (n8n example). GitHub Gist: instantly share code, notes, and snippets.

Gist
@train This will give tailscale nodes access to the docker compose service not give the docker compose service access to tailscale nodes, in case that’s what you meant.
@davidvasandani Ya i'm looking for the latter! The docker-compose service needs access to the tailnet and docker does a bunch of network funny business.
@train Ah! I’ll see if I can whip something up.
@train Do you want all non-docker-overlay traffic routed via tailscale or only MagicDNS IPs?

@train @davidvasandani

Hello! I do user research for Tailscale - did you get it working for your use case?

And have you looked at this guide already?

https://tailscale.com/kb/1282/docker

https://www.youtube.com/watch?v=YTjYXii4WzI

Container networking is complicated but we’d like to make this as simple as we can, so any feedback on problems you run into is super helpful!

Using Tailscale with Docker · Tailscale Docs

Connect your container to Tailscale using Tailscale's official Docker image.

Tailscale