Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- 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
|
| 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
|
| 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
|