Skip to content

Commit f2105a0

Browse files
committed
README: add docker instructions for volume mount permissions
1 parent e2d75cc commit f2105a0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ storing links in a temporary database, and will not attempt to join a tailnet.
2020

2121
The equivalent using the pre-built docker image:
2222

23-
docker run -it --rm -p 8080:8080 -v /tmp/golink:/root ghcr.io/tailscale/golink:main -dev-listen :8080
23+
docker run -it --rm -p 8080:8080 ghcr.io/tailscale/golink:main -dev-listen :8080
24+
25+
If you receive the docker error `unable to open database file: out of memory (14)`,
26+
use a persistent volume as documented in [Running in production](#running-in-production).
2427

2528
## Joining a tailnet
2629

@@ -60,9 +63,13 @@ Two pieces of data should be on persistent volumes:
6063
- tailscale data files in the `tsnet-golink` directory inside [os.UserConfigDir]
6164
- the sqlite database file where links are stored
6265

63-
In the docker image, both are stored in `/root`, so you can mount a persistent volume at /root:
66+
In the docker image, both are stored in `/home/nonroot`, so you can mount a persistent volume:
67+
68+
docker run -v /persistant/data:/home/nonroot ghcr.io/tailscale/golink:main
6469

65-
docker run -v /persistant/data:/root ghcr.io/tailscale/golink:main
70+
The mounted directory will need to be writable by the nonroot user (uid: 65532, gid: 65532),
71+
for example by calling `sudo chown 65532 /persistent/data`.
72+
Alternatively, you can run golink as root using `docker run -u root`.
6673

6774
No ports need to be exposed, whether running as a binary or in docker.
6875
golink will listen on port 80 on the tailscale interface, so can be accessed at http://go/.

0 commit comments

Comments
 (0)