Abid Ali Awan commited on
Commit
9feaed2
1 Parent(s): e29d227

fixed the docker

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -17
Dockerfile CHANGED
@@ -1,28 +1,17 @@
1
- # Set up a new user named "user" with user ID 1000
2
- RUN useradd -m -u 1000 user
3
-
4
- # Switch to the "user" user
5
- USER user
6
-
7
- # Set home to the user's home directory
8
- ENV HOME=/home/user \
9
- PATH=/home/user/.local/bin:$PATH
10
-
11
- # Set the working directory to the user's home directory
12
- WORKDIR $HOME/app
13
-
14
  # Use an official Python runtime as a parent image
15
  FROM python:3.9-slim
16
 
 
 
17
 
18
  # Copy the current directory contents into the container at /app
19
- COPY --chown=user . $HOME/app
20
 
21
  # Install any needed packages specified in requirements.txt
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
- # Expose port 8000
25
- EXPOSE 8000
26
 
27
  # Run the application
28
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.9-slim
3
 
4
+ # Set the working directory
5
+ WORKDIR /app
6
 
7
  # Copy the current directory contents into the container at /app
8
+ COPY . /app
9
 
10
  # Install any needed packages specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Expose port 7860
14
+ EXPOSE 7860
15
 
16
  # Run the application
17
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]