Spaces:
Paused
Paused
Sunset Mikoto commited on
Commit ·
bc49da4
1
Parent(s): c194d29
Tailscale
Browse files- Dockerfile +6 -0
- deploy-container/entrypoint.sh +6 -0
Dockerfile
CHANGED
|
@@ -29,6 +29,12 @@ RUN sudo chown -R coder:coder /home/coder/.local
|
|
| 29 |
# Install apt packages:
|
| 30 |
# RUN sudo apt-get install -y ubuntu-make
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
# Copy files:
|
| 33 |
# COPY deploy-container/myTool /home/coder/myTool
|
| 34 |
|
|
|
|
| 29 |
# Install apt packages:
|
| 30 |
# RUN sudo apt-get install -y ubuntu-make
|
| 31 |
|
| 32 |
+
RUN curl -fsSL https://tailscale.com/install.sh | sh
|
| 33 |
+
RUN sudo mkdir -p --mode=0755 /usr/share/keyrings && \
|
| 34 |
+
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null && \
|
| 35 |
+
echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared any main' | sudo tee /etc/apt/sources.list.d/cloudflared.list && \
|
| 36 |
+
sudo apt-get update && sudo apt-get install cloudflared
|
| 37 |
+
|
| 38 |
# Copy files:
|
| 39 |
# COPY deploy-container/myTool /home/coder/myTool
|
| 40 |
|
deploy-container/entrypoint.sh
CHANGED
|
@@ -95,6 +95,12 @@ if [ -n "$DOTFILES_REPO" ]; then
|
|
| 95 |
[ -f "$HOME/dotfiles/install.sh" ] && $HOME/dotfiles/install.sh
|
| 96 |
fi
|
| 97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
echo "[$PREFIX] Starting code-server..."
|
| 99 |
# Now we can run code-server with the default entrypoint
|
| 100 |
/usr/bin/entrypoint.sh --bind-addr 0.0.0.0:7860 $START_DIR
|
|
|
|
| 95 |
[ -f "$HOME/dotfiles/install.sh" ] && $HOME/dotfiles/install.sh
|
| 96 |
fi
|
| 97 |
|
| 98 |
+
# Setup Tailscale
|
| 99 |
+
if [ -n "$TS_AUTHKEY" ]; then
|
| 100 |
+
tailscale up --authkey="${TS_AUTHKEY}?preauthorized=true&ephemeral=true" --hostname=${TS_HOSTNAME} --advertise-exit-node=true --ssh=true --accept-dns --advertise-tags=tag:container
|
| 101 |
+
tailscale set --webclient=true --auto-update=true --posture-checking=true
|
| 102 |
+
fi
|
| 103 |
+
|
| 104 |
echo "[$PREFIX] Starting code-server..."
|
| 105 |
# Now we can run code-server with the default entrypoint
|
| 106 |
/usr/bin/entrypoint.sh --bind-addr 0.0.0.0:7860 $START_DIR
|