tailscale start daemon

This commit is contained in:
2026-02-20 17:00:20 -05:00
parent 302f4da450
commit 81ca4aef19
2 changed files with 16 additions and 7 deletions

View File

@@ -33,6 +33,19 @@ RUN GOG_VERSION=$(curl -s https://api.github.com/repos/steipete/gogcli/releases/
# Install Tailscale
RUN curl -fsSL https://tailscale.com/install.sh | HEADLESS=true sh
# Create tailscale directories
RUN mkdir -p /var/run/tailscale /home/node/.local/share/tailscale /home/node/.local/share/tailscale/files /home/node/.local/bin && \
chmod 777 /var/run/tailscale && \
chown -R node:node /home/node/.local
# Create tailscale startup script (runs as node user)
RUN echo '#!/bin/sh' > /home/node/.local/bin/tailscale-start.sh && \
echo 'mkdir -p /var/run/tailscale /home/node/.local/share/tailscale /home/node/.local/share/tailscale/files' >> /home/node/.local/bin/tailscale-start.sh && \
echo 'tailscaled --socket=/tmp/tailscale.sock --tun=userspace-networking &' >> /home/node/.local/bin/tailscale-start.sh && \
echo 'sleep 3' >> /home/node/.local/bin/tailscale-start.sh && \
echo 'tailscale --socket=/tmp/tailscale.sock up --authkey=$TAILSCALE_AUTH_KEY' >> /home/node/.local/bin/tailscale-start.sh && \
chmod +x /home/node/.local/bin/tailscale-start.sh
# Copy custom tools into the image
COPY tools/* /usr/local/bin/
COPY bin/* /usr/local/bin/