Update Dockerfile
Browse files- Dockerfile +4 -9
Dockerfile
CHANGED
@@ -13,17 +13,12 @@ RUN apt-get update && \
|
|
13 |
&& apt-get clean \
|
14 |
&& rm -rf /var/lib/apt/lists/*
|
15 |
|
|
|
|
|
16 |
# Install FastAPI and Uvicorn
|
17 |
RUN pip3 install fastapi uvicorn
|
18 |
|
19 |
-
|
20 |
-
COPY main.py /app/main.py
|
21 |
-
|
22 |
-
# Set the working directory
|
23 |
-
WORKDIR /app
|
24 |
|
25 |
-
|
26 |
-
EXPOSE 5000
|
27 |
|
28 |
-
# Run the FastAPI app with Uvicorn
|
29 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000"]
|
|
|
13 |
&& apt-get clean \
|
14 |
&& rm -rf /var/lib/apt/lists/*
|
15 |
|
16 |
+
RUN useradd -m -u 1000 user
|
17 |
+
|
18 |
# Install FastAPI and Uvicorn
|
19 |
RUN pip3 install fastapi uvicorn
|
20 |
|
21 |
+
COPY --chown=user . /app
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
24 |
|
|
|
|