Question for #tailscale and/or #docker folks from an extremely new user of both on my home NAS…

How do I get one docker container to access `https://*.*.ts.net` URLs served by another?

I have one container serving Forgejo, works great! But my Renovate container will only resolve the local or Tailscale IP, not the fancy MagicDNS URL. (Which would be fine if it never needed to follow nicer URLs returned by the Forgejo API.)

Setting the container’s network to that of the Forgejo Tailscale server enables access to the server’s port, but not the nice URL. 🤷

**Update:** Solved! https://social.lol/@tylersticka/116767952316840680

Tyler Sticka (@[email protected])

Figured it out! 🎉 Needed to add Tailscale's MagicDNS to the server config: https://github.com/tailscale/tailscale/issues/14467#issuecomment-3715457739

social.lol
Figured it out! 🎉 Needed to add Tailscale's MagicDNS to the server config: https://github.com/tailscale/tailscale/issues/14467#issuecomment-3715457739
Tailscale Docker containers cannot communicate over MagicDNS unless the host is configured with 100.100.100.100 as a nameserver · Issue #14467 · tailscale/tailscale

What is the issue? Tailscale docker containers cannot communicate over MagicDNS unless 100.100.100.100 is present as a nameserver entry to /etc/resolv.conf within the container. This is dependent o...

GitHub

@tylersticka are you setting container names? I like docker compose, keeps everything clear, and if you name containers, they'll be available on your internal docker network at http://{{container name}}:{{port}}

Hope that helps

@tylersticka is tailscale running *in* container 2?

I host a couple of services on docker on a single PC. But the tailscale runs bare metal and the containers talk via local ports mostly.

@thatdnaguy No, it’s running on the NAS directly.

Everything talks fine on local ports. But Forgejo expects a single root URL, and the MagicDNS one only resolves for requests outside the NAS. I can’t get another container in the same machine to communicate with its API via that URL.

@tylersticka gotcha. On my local network I have our local DNS server resolve my fun name for the host machine to the local IP.
@tylersticka off site on tailscale it resolves through the tailnet IP. Locally it resolves to the LAN IP