Spaces:
Build error
Build error
# Using Ubuntu as the base image | |
FROM ubuntu:latest | |
# Setting environment variables | |
ENV TMATE_SOCK=/tmp/tmate.sock | |
# Setting up necessary dependencies and tmate session | |
RUN apt-get update && apt-get install -y tmate kubuntu-desktop xrdp jq curl unzip \ | |
&& echo "root:ilovedogshit" | chpasswd \ | |
&& tmate -S $TMATE_SOCK new-session -d \ | |
&& tmate -S $TMATE_SOCK wait tmate-ready | |
# Showing tmate connection details | |
RUN echo "SSH connection: $(tmate -S $TMATE_SOCK display -p '#{tmate_ssh}')" \ | |
&& echo "Web connection: $(tmate -S $TMATE_SOCK display -p '#{tmate_web}')" | |
# Setting up xrdp | |
RUN /etc/init.d/xrdp start | |
# Installing and setting up ngrok tunnel | |
RUN curl -s https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip > ngrok.zip \ | |
&& unzip ngrok.zip \ | |
&& chmod +x ./ngrok \ | |
&& echo "Starting ngrok tunnel..." \ | |
&& ./ngrok authtoken 2N5KFYmyocPObelDKx26R1e2gfP_MiFweWSd9A8CbrC1E9Ef \ | |
&& ./ngrok tcp 3389 & \ | |
&& sleep 10 | |
# Showing ngrok connection details | |
RUN NGROK_URL=$(curl --silent --show-error http://localhost:4040/api/tunnels | jq '.tunnels[0].public_url') \ | |
&& if [ -z "$NGROK_URL" ]; then echo "Failed to get ngrok URL" && exit 1; fi \ | |
&& echo "RDP connection: $NGROK_URL" | |