Skip to content

Commit

Permalink
docs: correct the service code on docker-secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidapaulopt committed Nov 27, 2024
1 parent a7dd073 commit 469484e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/content/docs/advanced/docker-secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ If you want to use Docker secrets to store your Tailscale authkey, you can use t

{{% steps %}}

### Requirements ###

Make sure you have Docker Swarm enabled on your server.

<https://docs.docker.com/engine/swarm/secrets/>

"Docker secrets are only available to swarm services, not to standalone containers. To use this feature, consider adapting your container to run as a service."

### Add a docker secret

We need to create a docker secret, which we can name `authkey` and store the Tailscale authkey in it. We can do that using the following command:
Expand All @@ -30,6 +38,8 @@ services:
# Address of docker server (access to example.com ports)
- TSDPROXY_HOSTNAME=192.168.1.1
- DOCKER_HOST=unix:///var/run/docker.sock
secrets:
- authkey

volumes:
datadir:
Expand Down

0 comments on commit 469484e

Please sign in to comment.