robinroy03 commited on
Commit
5ebcd3d
1 Parent(s): 62fb42a

dockerfile update - doc

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -1
Dockerfile CHANGED
@@ -1,3 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  FROM python
2
 
3
  WORKDIR /code
@@ -6,6 +18,15 @@ COPY ./requirements.txt /code/requirements.txt
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
- COPY . .
 
 
 
 
 
 
 
 
 
10
 
11
  CMD ["gunicorn", "-w", "1", "main:app"]
 
1
+ # FROM python
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
+ # CMD ["gunicorn", "-w", "1", "main:app"]
12
+
13
  FROM python
14
 
15
  WORKDIR /code
 
18
 
19
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
20
 
21
+ RUN useradd -m -u 1000 user
22
+
23
+ USER user
24
+
25
+ ENV HOME=/home/user \
26
+ PATH=/home/user/.local/bin:$PATH
27
+
28
+ WORKDIR $HOME/app
29
+
30
+ COPY --chown=user . $HOME/app
31
 
32
  CMD ["gunicorn", "-w", "1", "main:app"]