Nowa998 commited on
Commit
74bc08c
·
verified ·
1 Parent(s): 193df5c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -1
Dockerfile CHANGED
@@ -1 +1,28 @@
1
- docker run -d -e R3_REGISTRATION_CODE="7F7FB958-7F9C-5753-B578-B0280CC902CF" --restart unless-stopped --pull always remoteit/remoteit-agent:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # Install Remote.it agent
10
+ RUN curl -L https://downloads.remote.it/remoteit/install_agent.sh | bash
11
+
12
+ # Create start script
13
+ RUN mkdir -p /app
14
+ RUN echo '#!/bin/bash' > /app/start.sh
15
+ RUN echo 'service ssh start' >> /app/start.sh
16
+ RUN echo 'echo "=============================="' >> /app/start.sh
17
+ RUN echo 'echo "Registering Remote.it agent..."' >> /app/start.sh
18
+ RUN echo 'r3-agent register --code 7F7FB958-7F9C-5753-B578-B0280CC902CF' >> /app/start.sh
19
+ RUN echo 'echo "=============================="' >> /app/start.sh
20
+ RUN echo 'echo "Agent registered. Check app.remote.it"' >> /app/start.sh
21
+ RUN echo 'echo "=============================="' >> /app/start.sh
22
+ RUN echo 'r3-agent run &' >> /app/start.sh
23
+ RUN echo 'tail -f /dev/null' >> /app/start.sh
24
+ RUN chmod +x /app/start.sh
25
+
26
+ EXPOSE 22
27
+
28
+ CMD ["/app/start.sh"]