Skip to content

Commit a83dfa2

Browse files
authored
README: replace docker run with a docker compose yaml file
Fixes: #86 Signed-off-by: Alex Kretzschmar <[email protected]>
1 parent 3877b43 commit a83dfa2

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

README.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,34 @@
2020

2121
Docker images are automatically published on when releases are tagged.
2222

23-
```bash
24-
# to use the latest image
25-
$ docker pull ghcr.io/tailscale/tsidp:latest
26-
27-
# to use a specific release version
28-
$ docker pull ghcr.io/tailscale/tsidp:v0.0.2
29-
```
30-
31-
Running a tsidp container:
32-
3323
> [!TIP]
3424
> Replace `YOUR_TAILSCALE_AUTHKEY` with your Tailscale authentication key in the following commands:
3525
>
3626
> Use an existing auth key or create a new auth key in the [Tailscale dashboard](https://login.tailscale.com/admin/settings/keys). Ensure you select an existing [tag](https://tailscale.com/kb/1068/tags) or create a new one.
3727
38-
```bash
39-
# Run tsidp with a persistent volume to store state
40-
docker run -d \
41-
--name tsidp \
42-
-p 443:443 \
43-
-v tsidp-data:/data \
44-
-e TAILSCALE_USE_WIP_CODE=1 \
45-
-e TS_STATE_DIR=/data \
46-
-e TS_HOSTNAME=idp \
47-
-e TSIDP_ENABLE_STS=1 \
48-
ghcr.io/tailscale/tsidp:latest
28+
Here is an example [docker compose](https://docs.docker.com/compose/) YAML file for tsidp:
29+
30+
```yaml
31+
services:
32+
tsidp:
33+
container_name: tsidp
34+
image: ghcr.io/tailscale/tsidp:latest
35+
volumes:
36+
- tsidp-data:/data
37+
environment:
38+
- TAILSCALE_USE_WIP_CODE=1 # tsidp is experimental - needed while version <1.0.0
39+
- TS_STATE_DIR=/data # store persistent tsnet and tsidp state
40+
- TS_HOSTNAME=idp # Hostname on tailnet (becomes idp.your-tailnet.ts.net)
41+
- TSIDP_ENABLE_STS=1 # Enable OAuth token exchange
42+
# Optional: Tailscale auth key for automatic node registration
43+
# - TS_AUTHKEY=tskey-auth-xxxxx
44+
volumes:
45+
tsidp-data:
4946
```
5047
51-
Visit `https://idp.yourtailnet.ts.net` to confirm the service is running.
48+
Paste the YAML snippet above into a file named `compose.yaml`. Once the compose file has been edited to your satisfaction, start tsidp by issuing `docker compose up -d`. Monitor the result with `docker compose logs -f`.
49+
50+
Once tsidp has started, visit `https://idp.yourtailnet.ts.net` in a browser to confirm the service is running.
5251

5352
> [!NOTE]
5453
> If you're running tsidp for the first time it may take a few minutes for the TLS certificate to generate. You may not be able to access the service until the certificate is ready.

0 commit comments

Comments
 (0)