You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Convert into Dev Container feature
Fixes#5
* Redirect tailscaled log to /dev/null
* Use --statedir instead of --state
* Updated tailscale up command
* Revert accidental removal
This repository contains a simple [codespace devcontainer](https://github.com/features/codespaces)
3
-
which can connect the running VM to a [Tailscale network](https://tailscale.com). To use it
4
-
you need to be a member of a GitHub Organization which has Codespaces enabled. When you
5
-
click on the Code button you should see a second tab with an option to start up
6
-
a new codespace.
1
+
# Codespace feature for Tailscale connectivity
2
+
3
+
This repository contains a feature for [GitHub Codespaces](https://github.com/features/codespaces)
4
+
to connect the running VM to a [Tailscale network](https://tailscale.com).
7
5
8
6

9
7
10
-
You need to create a [Reusable Authkey](https://login.tailscale.com/admin/settings/authkeys)
11
-
for your Tailnet and add it as a [Codespaces Secret](https://github.com/settings/codespaces)
12
-
named `TAILSCALE_AUTHKEY`.
8
+
To get started, add the following [feature](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file)
9
+
to your `devcontainer.json`:
10
+
11
+
```json
12
+
"runArgs": ["--device=/dev/net/tun"],
13
+
"features": {
14
+
// ...
15
+
"ghcr.io/tailscale/codespace/tailscale": {}
16
+
// ...
17
+
}
18
+
```
19
+
20
+
Then launch your Codespace. After it starts up, run [`tailscale up`](https://tailscale.com/kb/1080/cli/#up):
21
+
22
+
```shell
23
+
sudo tailscale up --accept-routes
24
+
```
13
25
14
-
Then launch your codespace!
26
+
You'll only need to run `tailscale up` once per Codespace.
27
+
The Tailscale state will be saved between rebuilds.
0 commit comments