Update Dockerfile
Browse files- 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 |
-
#
|
|
|
|
|
|
|
|
|
|
| 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 |
|