Spaces:
Build error
Build error
File size: 1,247 Bytes
e4f1cb0 a8066b9 e4f1cb0 a8066b9 e4f1cb0 a8066b9 e4f1cb0 a8066b9 e4f1cb0 a8066b9 e4f1cb0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# 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"
|