rahul-appu commited on
Commit
9b6148a
·
1 Parent(s): 70009f7

Again One Last Time

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -1,18 +1,20 @@
1
- # you will also find guides on how best to write your Dockerfile
2
-
3
- FROM python:3.9
4
 
5
  RUN useradd -m -u 1000 user
6
  USER user
7
 
8
  WORKDIR /code
9
 
10
- COPY ./requirements.txt /code/requirements.txt
11
-
12
  RUN chown -R user:user /code
13
 
14
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
 
 
 
 
 
15
 
16
- COPY --chown=user:user . /code
17
 
18
  CMD ["python", "main.py"]
 
1
+ FROM python:3.10
 
 
2
 
3
  RUN useradd -m -u 1000 user
4
  USER user
5
 
6
  WORKDIR /code
7
 
 
 
8
  RUN chown -R user:user /code
9
 
10
+ ENV HOME=/home/user
11
+ ENV PATH=/home/user/.local/bin:$PATH
12
+
13
+ WORKDIR $HOME/app
14
+
15
+ COPY ./requirements.txt ./
16
+ RUN pip install --no-cache-dir -r ./requirements.txt
17
 
18
+ COPY --chown=user . $HOME/app
19
 
20
  CMD ["python", "main.py"]