Ferdi commited on
Commit
e32c22b
1 Parent(s): b587563

added user to dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -2
Dockerfile CHANGED
@@ -4,13 +4,16 @@ FROM python:3.9-slim
4
  # Set the working directory in the container
5
  WORKDIR /usr/src/app
6
 
 
 
 
7
 
8
  # Install any needed packages specified in requirements.txt
9
- COPY requirements.txt ./
10
  RUN pip install -r requirements.txt
11
 
12
  # Copy the rest of your application's code
13
- COPY ./src .
14
 
15
  # Make port 7860 available to the world outside this container
16
  EXPOSE 7860
 
4
  # Set the working directory in the container
5
  WORKDIR /usr/src/app
6
 
7
+ RUN useradd -m -u 1000 user
8
+
9
+ USER user
10
 
11
  # Install any needed packages specified in requirements.txt
12
+ COPY --chown=user requirements.txt ./
13
  RUN pip install -r requirements.txt
14
 
15
  # Copy the rest of your application's code
16
+ COPY --chown=user ./src .
17
 
18
  # Make port 7860 available to the world outside this container
19
  EXPOSE 7860