Nowa998 commited on
Commit
13fbfc8
·
verified ·
1 Parent(s): f25b1c5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -8
Dockerfile CHANGED
@@ -6,19 +6,13 @@ RUN apt update && apt install -y wget curl openssh-server openjdk-17-jre-headles
6
  RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
7
  RUN echo "root:eren" | chpasswd
8
 
9
- # Create start script that uses Serveo for instant SSH
10
  RUN mkdir -p /app
11
  RUN echo '#!/bin/bash' > /app/start.sh
12
  RUN echo 'service ssh start' >> /app/start.sh
13
  RUN echo 'echo "=============================="' >> /app/start.sh
14
  RUN echo 'echo "Creating Serveo SSH tunnel..."' >> /app/start.sh
15
- RUN echo 'ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -R 0:localhost:22 serveo.net 2>&1 | tee /app/serveo.log &' >> /app/start.sh
16
- RUN echo 'sleep 10' >> /app/start.sh
17
- RUN echo 'echo "=============================="' >> /app/start.sh
18
- RUN echo 'echo "Your SSH address:"' >> /app/start.sh
19
- RUN echo 'cat /app/serveo.log | grep -o "Forwarding.*"' >> /app/start.sh
20
- RUN echo 'echo "=============================="' >> /app/start.sh
21
- RUN echo 'tail -f /dev/null' >> /app/start.sh
22
  RUN chmod +x /app/start.sh
23
 
24
  EXPOSE 22
 
6
  RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
7
  RUN echo "root:eren" | chpasswd
8
 
9
+ # Create start script
10
  RUN mkdir -p /app
11
  RUN echo '#!/bin/bash' > /app/start.sh
12
  RUN echo 'service ssh start' >> /app/start.sh
13
  RUN echo 'echo "=============================="' >> /app/start.sh
14
  RUN echo 'echo "Creating Serveo SSH tunnel..."' >> /app/start.sh
15
+ RUN echo 'ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -R 2222:localhost:22 serveo.net' >> /app/start.sh
 
 
 
 
 
 
16
  RUN chmod +x /app/start.sh
17
 
18
  EXPOSE 22