heyday1234 commited on
Commit
d851236
·
verified ·
1 Parent(s): edbf017

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -4,13 +4,18 @@ FROM python:3.10-slim-bullseye
4
  # Set the working directory to corrent folder
5
  WORKDIR /app
6
 
 
 
 
 
 
7
  # Copy the requirements to working directory
8
  COPY ./requirements.txt /app/requirements.txt
9
 
10
  # Install all packages in requirements.txt
11
  RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
12
 
13
- COPY . /app
14
 
15
  EXPOSE 7860
16
 
 
4
  # Set the working directory to corrent folder
5
  WORKDIR /app
6
 
7
+ RUN useradd -m -u 1000 user
8
+ USER user
9
+
10
+ RUN chown -R user:user /app
11
+
12
  # Copy the requirements to working directory
13
  COPY ./requirements.txt /app/requirements.txt
14
 
15
  # Install all packages in requirements.txt
16
  RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
17
 
18
+ COPY --chown=user:user . /app
19
 
20
  EXPOSE 7860
21