Salahin commited on
Commit
ad65e55
·
verified ·
1 Parent(s): 8c7dec9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # Copy the application code
14
- COPY . .
 
15
 
16
- # Expose the port
17
- EXPOSE 8000
 
 
 
 
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"]