Guinnessgshep commited on
Commit
e4f1cb0
·
1 Parent(s): a8066b9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -36
Dockerfile CHANGED
@@ -1,44 +1,35 @@
1
- # Use the latest version of Ubuntu as a base
2
  FROM ubuntu:latest
3
 
4
- # Set up environment variables
5
- ENV TMATE_SOCK /tmp/tmate.sock
6
- ENV NGROK_TOKEN {INSERT_YOUR_NGROK_TOKEN_HERE}
7
 
8
- # Install system dependencies
9
- RUN apt-get update && \
10
- apt-get install -y \
11
- tmate \
12
- kubuntu-desktop \
13
- xrdp \
14
- jq \
15
- curl \
16
- unzip
17
 
18
- # Change password
19
- RUN echo "root:ilovedogshit" | chpasswd
 
20
 
21
- # Setup tmate session
22
- RUN tmate -S $TMATE_SOCK new-session -d && \
23
- tmate -S $TMATE_SOCK wait tmate-ready && \
24
- echo "TMATE_SSH=$(tmate -S $TMATE_SOCK display -p '#{tmate_ssh}')" && \
25
- echo "TMATE_WEB=$(tmate -S $TMATE_SOCK display -p '#{tmate_web}')"
26
-
27
- # Setup xrdp
28
  RUN /etc/init.d/xrdp start
29
 
30
- # Install ngrok
31
- RUN curl -s https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip > ngrok.zip && \
32
- unzip ngrok.zip && \
33
- chmod +x ./ngrok && \
34
- ./ngrok authtoken 2N5KFYmyocPObelDKx26R1e2gfP_MiFweWSd9A8CbrC1E9Ef && \
35
- ./ngrok tcp 3389 & \
36
- sleep 10 && \
37
- NGROK_URL=$(curl --silent --show-error http://localhost:4040/api/tunnels | jq '.tunnels[0].public_url') && \
38
- if [ -z "$NGROK_URL" ]; then \
39
- echo "Failed to get ngrok URL"; exit 1; \
40
- fi && \
41
- echo "NGROK_URL=$NGROK_URL"
 
42
 
43
- # Keep Container running
44
- CMD while true; do echo "Keeping Docker Container running..."; sleep 300; done
 
1
+ # Using Ubuntu as the base image
2
  FROM ubuntu:latest
3
 
4
+ # Setting environment variables
5
+ ENV TMATE_SOCK=/tmp/tmate.sock
 
6
 
7
+ # Setting up necessary dependencies and tmate session
8
+ RUN apt-get update && apt-get install -y tmate kubuntu-desktop xrdp jq curl unzip \
9
+ && echo "root:ilovedogshit" | chpasswd \
10
+ && tmate -S $TMATE_SOCK new-session -d \
11
+ && tmate -S $TMATE_SOCK wait tmate-ready
 
 
 
 
12
 
13
+ # Showing tmate connection details
14
+ RUN echo "SSH connection: $(tmate -S $TMATE_SOCK display -p '#{tmate_ssh}')" \
15
+ && echo "Web connection: $(tmate -S $TMATE_SOCK display -p '#{tmate_web}')"
16
 
17
+ # Setting up xrdp
 
 
 
 
 
 
18
  RUN /etc/init.d/xrdp start
19
 
20
+ # Installing and setting up ngrok tunnel
21
+ RUN curl -s https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip > ngrok.zip \
22
+ && unzip ngrok.zip \
23
+ && chmod +x ./ngrok \
24
+ && echo "Starting ngrok tunnel..." \
25
+ && ./ngrok authtoken 2N5KFYmyocPObelDKx26R1e2gfP_MiFweWSd9A8CbrC1E9Ef \
26
+ && ./ngrok tcp 3389 & \
27
+ && sleep 10
28
+
29
+ # Showing ngrok connection details
30
+ RUN NGROK_URL=$(curl --silent --show-error http://localhost:4040/api/tunnels | jq '.tunnels[0].public_url') \
31
+ && if [ -z "$NGROK_URL" ]; then echo "Failed to get ngrok URL" && exit 1; fi \
32
+ && echo "RDP connection: $NGROK_URL"
33
 
34
+ # Keep Docker running
35
+ CMD while true; do echo "Keeping Docker running..." && sleep 300; done