rairo commited on
Commit
9dc742b
·
verified ·
1 Parent(s): a3d2146

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -1
Dockerfile CHANGED
@@ -1,12 +1,18 @@
1
  FROM python:3.9
2
 
 
 
 
 
3
  WORKDIR /code
4
 
5
  COPY ./requirements.txt /code/requirements.txt
6
 
 
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
- COPY . .
10
 
11
  #ENTRYPOINT ["gunicorn", "main:app"]
12
 
 
1
  FROM python:3.9
2
 
3
+ RUN useradd -m -u 1000 user
4
+
5
+ USER user
6
+
7
  WORKDIR /code
8
 
9
  COPY ./requirements.txt /code/requirements.txt
10
 
11
+ RUN chown -R user:user /code
12
+
13
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
14
 
15
+ COPY --chown=user:user . /code
16
 
17
  #ENTRYPOINT ["gunicorn", "main:app"]
18