Spaces:
Paused
Paused
Upload Dockerfile
Browse files- 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 |
-
#
|
| 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
|
|
|
|
| 32 |
RUN echo '#!/bin/bash\n\
|
| 33 |
-
|
| 34 |
-
|
| 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"]
|