1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00

Update docker related doc (#1421)

This commit is contained in:
zx 2024-03-15 06:01:33 +08:00 committed by GitHub
parent 95004de5e8
commit b477e5f366
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,6 +92,26 @@ Note: use `0.0.0.0:8080:8080` instead of `127.0.0.1:8080:8080` if you want to ex
This command will mount `config/` under `/etc/headscale`, forward port 8080 out of the container so the This command will mount `config/` under `/etc/headscale`, forward port 8080 out of the container so the
`headscale` instance becomes available and then detach so headscale runs in the background. `headscale` instance becomes available and then detach so headscale runs in the background.
Example `docker-compose.yaml`
```yaml
version: "3.7"
services:
headscale:
image: headscale/headscale:0.22.3
restart: unless-stopped
container_name: headscale
ports:
- "127.0.0.1:8080:8080"
- "127.0.0.1:9090:9090"
volumes:
# pls change [config_path] to the fullpath of the config folder just created
- [config_path]:/etc/headscale
command: headscale serve
```
5. Verify `headscale` is running: 5. Verify `headscale` is running:
Follow the container logs: Follow the container logs: