Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -4
Dockerfile
CHANGED
|
@@ -10,11 +10,16 @@ COPY requirements.txt .
|
|
| 10 |
# Install the dependencies
|
| 11 |
RUN pip install -r requirements.txt
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
# Run the command to start the development server
|
| 20 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
| 10 |
# Install the dependencies
|
| 11 |
RUN pip install -r requirements.txt
|
| 12 |
|
| 13 |
+
RUN useradd -m -u 1000 user
|
| 14 |
+
|
| 15 |
+
USER user
|
| 16 |
|
| 17 |
+
ENV HOME =/home/user \
|
| 18 |
+
PATH=/home/user/.local/bin:$PATH
|
| 19 |
+
|
| 20 |
+
WORKDIR $HOME/app
|
| 21 |
+
# Copy the application code
|
| 22 |
+
COPY --chown=user . $HOME/app
|
| 23 |
|
| 24 |
# Run the command to start the development server
|
| 25 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|