yasirmalik786 commited on
Commit
890a359
·
verified ·
1 Parent(s): 89e49dc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -20
Dockerfile CHANGED
@@ -1,20 +1,20 @@
1
- FROM python:3.12.6
2
-
3
- # Set working directory inside container
4
- WORKDIR /code
5
-
6
- # Copy requirements file (fixing the typo in the filename and path)
7
- COPY ./requirement.txt /code/requirement.txt
8
-
9
- # Install dependencies
10
- RUN pip install --no-cache-dir --upgrade -r /code/requirement.txt
11
-
12
- # Add a non-root user and switch to it
13
- RUN useradd -m user
14
- USER user
15
-
16
- # Copy the FastAPI app code
17
- COPY . /code
18
-
19
- # Command to run the app with uvicorn
20
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
1
+ FROM python:3.12.6
2
+
3
+ # Set working directory inside container
4
+ WORKDIR /code
5
+
6
+ # Copy requirements file (fixing the typo in the filename and path)
7
+ COPY ./requirment.txt /code/requirment.txt
8
+
9
+ # Install dependencies
10
+ RUN pip install --no-cache-dir --upgrade -r /code/requirement.txt
11
+
12
+ # Add a non-root user and switch to it
13
+ RUN useradd -m user
14
+ USER user
15
+
16
+ # Copy the FastAPI app code
17
+ COPY . /code
18
+
19
+ # Command to run the app with uvicorn
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]