Update Dockerfile
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
# Use the official Python image from the Docker Hub
|
2 |
-
FROM python:3.9
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
@@ -22,4 +27,4 @@ COPY . /app
|
|
22 |
EXPOSE 8000
|
23 |
|
24 |
# Run app.py when the container launches
|
25 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "
|
|
|
1 |
# Use the official Python image from the Docker Hub
|
2 |
+
FROM python:3.9
|
3 |
+
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
USER user
|
6 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
7 |
+
|
8 |
|
9 |
# Set the working directory in the container
|
10 |
WORKDIR /app
|
|
|
27 |
EXPOSE 8000
|
28 |
|
29 |
# Run app.py when the container launches
|
30 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|