Nowa998 commited on
Commit
193df5c
·
verified ·
1 Parent(s): 239a0c8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -30
Dockerfile CHANGED
@@ -1,30 +1 @@
1
- FROM debian:12
2
-
3
- RUN apt update && apt install -y wget curl openssh-server openjdk-17-jre-headless
4
-
5
- # Setup SSH
6
- RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
7
- RUN echo "root:eren" | chpasswd
8
-
9
- # Create start script with multiple port attempts
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 'PORTS="45678 45679 45680 45681 45682"' >> /app/start.sh
14
- RUN echo 'for PORT in $PORTS; do' >> /app/start.sh
15
- RUN echo ' echo "Trying port $PORT..."' >> /app/start.sh
16
- RUN echo ' ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R $PORT:localhost:22 serveo.net 2>&1 | tee /app/serveo-$PORT.log &' >> /app/start.sh
17
- RUN echo ' sleep 3' >> /app/start.sh
18
- RUN echo ' if grep -q "Forwarding" /app/serveo-$PORT.log 2>/dev/null; then' >> /app/start.sh
19
- RUN echo ' echo "=============================="' >> /app/start.sh
20
- RUN echo ' echo "SUCCESS! SSH Address: serveo.net:$PORT"' >> /app/start.sh
21
- RUN echo ' echo "=============================="' >> /app/start.sh
22
- RUN echo ' break' >> /app/start.sh
23
- RUN echo ' fi' >> /app/start.sh
24
- RUN echo 'done' >> /app/start.sh
25
- RUN echo 'tail -f /dev/null' >> /app/start.sh
26
- RUN chmod +x /app/start.sh
27
-
28
- EXPOSE 22
29
-
30
- CMD ["/app/start.sh"]
 
1
+ docker run -d -e R3_REGISTRATION_CODE="7F7FB958-7F9C-5753-B578-B0280CC902CF" --restart unless-stopped --pull always remoteit/remoteit-agent:latest