zhuhai111 commited on
Commit
80e15a7
·
verified ·
1 Parent(s): 34fe2fb

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -3,8 +3,9 @@ FROM scottyhardy/docker-remote-desktop:latest
3
 
4
  # Set up environment variables
5
  ENV PYTHONUNBUFFERED=1
6
- # Set RDP to start automatically
7
  ENV RDP_SERVER=yes
 
8
 
9
  # Install Python dependencies
10
  RUN apt-get update && \
@@ -28,13 +29,14 @@ RUN /app/venv/bin/pip install --no-cache-dir fastapi uvicorn websockets
28
  # Expose both WebSocket tunnel port and RDP port
29
  EXPOSE 7860 3389
30
 
31
- # Create startup script to run both services
 
32
  RUN echo '#!/bin/bash\n\
33
- # Start RDP service in background\n\
34
- /usr/bin/entrypoint.sh &\n\
35
  # Start WebSocket tunnel\n\
36
  /app/venv/bin/python /app/main.py\n\
37
  ' > /app/start.sh && chmod +x /app/start.sh
38
 
39
  # Set the entrypoint to run the startup script
40
- CMD ["/app/start.sh"]
 
3
 
4
  # Set up environment variables
5
  ENV PYTHONUNBUFFERED=1
6
+ # Ensure RDP server is configured properly
7
  ENV RDP_SERVER=yes
8
+ ENV DEBIAN_FRONTEND=noninteractive
9
 
10
  # Install Python dependencies
11
  RUN apt-get update && \
 
29
  # Expose both WebSocket tunnel port and RDP port
30
  EXPOSE 7860 3389
31
 
32
+ # Create startup script to run the WebSocket tunnel only
33
+ # Skip trying to start RDP services that require root permissions
34
  RUN echo '#!/bin/bash\n\
35
+ echo "Starting WebSocket tunnel service on port 7860..."\n\
36
+ echo "Remote desktop service should be available at localhost:3389"\n\
37
  # Start WebSocket tunnel\n\
38
  /app/venv/bin/python /app/main.py\n\
39
  ' > /app/start.sh && chmod +x /app/start.sh
40
 
41
  # Set the entrypoint to run the startup script
42
+ CMD ["/bin/bash", "/app/start.sh"]