20 Commits

Author SHA1 Message Date
Christoph
f3039ede98 Update tailscale_container_hook
- Allow changing the target address from Tailscale Serve
2025-02-21 08:31:02 +01:00
Christoph
87e8dd95fa Change TS Sidecar routine
- Enable Official Tailscale Sidecar routine via variable instead of detecting the binaries in hook script
2025-02-12 07:59:42 +01:00
tom mortensen
31e5a527fb Merge pull request #1985 from loganjohnlong/master
Install `ca-certificates` during `tailscale_container_hook` operations to prevent SSL errors in some cases
2025-01-26 12:51:26 -08:00
tom mortensen
8f16847efd Merge pull request #1990 from Squidly271/patch-18
Change Fallback TS StateDir Environment Variable name
2025-01-26 12:49:17 -08:00
Christoph
3f54e9a605 Add translation layer for official Tailscale Sidecar container 2025-01-23 17:58:29 +01:00
Squidly271
e92222841a Change Fallback TS StateDir Environment Variable name 2025-01-15 09:56:00 -05:00
Logan Long
1bdec7e342 Update tailscale_container_hook
Add `ca-certificates` to prevent `wget` from failing when checking Tailscale version
2025-01-11 01:02:38 -06:00
Squidly271
97f9fa0201 Add support to Tailscale for fallback TS Dir 2025-01-08 18:25:24 -05:00
Christoph
50e95fefa3 Improvements to TS State Dir check
- make sure override actually overrides state dir
- display error message when override is not set and detection failed
2024-12-10 21:44:44 +01:00
Christoph
daacabf32e Update tailscale_container_hook
- minor improvements to the message in container logs when state dir can't be found
2024-12-10 08:38:38 +01:00
Christoph
d687a6a404 Update tailscale_container_hook
- Add check if script runs as `root`
2024-12-06 07:32:30 +01:00
Christoph
c324597be2 Update tailscale_container_hook
- stop script if state dir can't be detected to make sure users see the ERROR message
2024-12-04 21:58:33 +01:00
Christoph
a1fe75ff2b Change state directory logic
- add check if `/config` exists
- display warning if detection was not successful
2024-12-03 17:59:50 +01:00
tom mortensen
b7200298fd Merge pull request #1923 from ich777/ich777-ts-update
Run container network check if network is changed in Docker
2024-11-15 16:03:56 -08:00
Christoph
af39488dd4 Add speedtest-cli to troubleshooting packages 2024-11-08 21:47:15 +01:00
Christoph Hummer
235b93fc3a Make hook script compatible with busybox date 2024-11-05 12:31:04 +01:00
Christoph Hummer
097b378174 Add USER_HOME to state dir detection
- Make containers with variable `USER_HOME` variable compatible with state dir detection
2024-10-31 07:07:14 +01:00
Christoph Hummer
4302afd29f Add Accept Routes 2024-10-27 15:06:44 +01:00
Christoph Hummer
27eae215d3 Add additional check for https to hook script 2024-10-25 21:34:01 +02:00
root
e289d2ad7c Initial Tailscale Docker integration
- Remove exclusion from share directory from .gitignore
- Add Unraid specific container hook script
- Add Tailscale icon
- Add helptexts for Tailscale

This integration allows users to easily make use of Tailscale in their Docker containers by just clicking a switch on the Docker page.
The Tailscale plugin itself is not needed for this integration but for the best user experience it is strongly recommended to install the Tailscale plugin from Community Applications.

How this works:
1. Configure Tailscale in the Docker template in Unraid and click Apply
2. Unraid will extract the default Entrypoint and CMD from the container
3. The hook script will be mounted in the container to /opt/unraid/tailscale-hook and the Entrypoint from the container will be modified to /opt/unraid/tailscale-hook
4. The original Entrypoint and CMD from the container, alongside with the other necessary variables for Tailscale will be passed over to the container
5. When the container starts the hook script will be executed, install dependencies (currently Alpine, Arch and Debian based containers are supported), download the newest version from Tailscale and run it
6. After the first start with Tailscale the container will halt and wait for the user to click on the link which is presented in the log from the container to add the container to your Tailnet
(alternatively one could also open up a Console from the container and issue `tailscale status` which will also present the link to authenticate the container to your Tailnet)
7. The hook script will pass over the default Entrypoint and CMD which was extracted in step 2 and the container will start as usual

These steps will be repeated after Container update, force update from the Docker page and if changes in the template are made.
If the container is only Started/Restarted the hook script will detect that Tailscale is installed and only start it, if one wants to update Tailscale inside the container simply hit `force update` on the Docker page in Unraid (with Advanced View Enabled)

The integration will show a Tailscale icon on the Docker page for each Tailscale enabled Container and show some basic information from the container (Installed Tailscale Version, Online Status, Hostname, Main Relay, IPs, Exit Node, Auth Expiry,...)
When Serve or Funnel is enabled it will also generate `Tailscale WebUI` in the drop down for the container which you can open up if Tailscale is installed from the device you are accessing Unraid.
2024-10-21 23:07:11 +02:00