tailscale / docker-extension

Docker Desktop extension adding Tailscale networking.
61 stars 12 forks source link

Enable Tailscale SSH #58

Open sylvorg opened 8 months ago

sylvorg commented 8 months ago

Hello!

As in the title; would it be possible to enable Tailscale SSH when logging in, or modify the tailscale up options?

Thank you kindly for the help!

DentonGentry commented 8 months ago

It is probably possible but I don't think it would do what one would want. Docker Desktop Extension, even on macOS and Windows, runs a small Linux system in a VM behind the scenes. tailscaled runs inside that VM, accepts connections coming in from the tailnet, and then connects to the same port on localhost so it can reach other containers which Docker Desktop is hosting.

There isn't a way for Tailscale SSH to let you get a shell inside the containers you are running. Even though you can use Tailscale to connect to ports on those containers, it is doing so by bouncing through localhost.

Tailscale SSH doesn't have a way to spawn a shell in the containers you are running, it only has a way to spawn a shell in the little Linux VM running behind the scenes.

sylvorg commented 8 months ago

This is the HyperVM in Windows' case, correct? I've got Tailscale SSH working on Ubuntu and NixOS on WSL2, if that's a similar situation?

sylvorg commented 8 months ago

Ah; now I get what you're saying. Could you show me a way to install and attach Tailscale in a situation such as docker compose, like what the service settings would be?