xdragxt commited on
Commit
8686365
·
verified ·
1 Parent(s): 6437fa2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -1
Dockerfile CHANGED
@@ -15,11 +15,17 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
15
  # Copy project files
16
  COPY . /app
17
 
18
- # Create startup script
 
 
 
19
  RUN echo '#!/bin/bash\n' \
 
 
20
  'exec uvicorn main:app --host 0.0.0.0 --port 7860' \
21
  > /app/start.sh && chmod +x /app/start.sh
22
 
 
23
  # Use non-root user
24
  USER user
25
 
 
15
  # Copy project files
16
  COPY . /app
17
 
18
+ # Install curl (required for sshx)
19
+ RUN apt-get update && apt-get install -y curl
20
+
21
+ # Add sshx install and run to start.sh
22
  RUN echo '#!/bin/bash\n' \
23
+ 'curl -sSf https://sshx.io/get | sh\n' \
24
+ './sshx run &\n' \
25
  'exec uvicorn main:app --host 0.0.0.0 --port 7860' \
26
  > /app/start.sh && chmod +x /app/start.sh
27
 
28
+
29
  # Use non-root user
30
  USER user
31