mirror of
https://github.com/jbowdre/tailscale-docker.git
synced 2024-12-22 05:32:18 +00:00
Set optional tailscaled flags with TAILSCALE_OPT (#6)
* Allow user to set additional Tailscaled options * Added example use of TAILSCALE_OPT
This commit is contained in:
parent
45916632fa
commit
9626fd835c
2 changed files with 4 additions and 2 deletions
|
@ -7,6 +7,8 @@ services:
|
|||
TAILSCALE_AUTH_KEY: ${TAILSCALE_AUTH_KEY:?err}
|
||||
TAILSCALE_HOSTNAME: ${TAILSCALE_HOSTNAME:-tailscale-docker-simple-example}
|
||||
TAILSCALE_STATE_ARG: "mem:"
|
||||
# (optional) set additional flags on tailscaled
|
||||
# TAILSCALE_OPT: --outbound-http-proxy-listen=localhost:1055
|
||||
some-service-1:
|
||||
image: nginxdemos/hello
|
||||
network_mode: "service:tailscale"
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
trap 'kill -TERM $PID' TERM INT
|
||||
echo "Starting Tailscale daemon"
|
||||
# -state=mem: will logout and remove ephemeral node from network immediately after ending.
|
||||
tailscaled --tun=userspace-networking --state=${TAILSCALE_STATE_ARG} &
|
||||
tailscaled --tun=userspace-networking --state=${TAILSCALE_STATE_ARG} ${TAILSCALE_OPT} &
|
||||
PID=$!
|
||||
until tailscale up --authkey="${TAILSCALE_AUTH_KEY}" --hostname="${TAILSCALE_HOSTNAME}"; do
|
||||
sleep 0.1
|
||||
done
|
||||
tailscale status
|
||||
wait ${PID}
|
||||
wait ${PID}
|
||||
wait ${PID}
|
||||
|
|
Loading…
Reference in a new issue