leofan commited on
Commit
967d0df
1 Parent(s): 8fe83d8

Update docker file to create new user

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -1
Dockerfile CHANGED
@@ -14,7 +14,16 @@ RUN poetry install --no-interaction --no-ansi --no-root
14
 
15
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
 
17
- COPY ./app ./app
 
 
 
 
 
 
 
 
 
18
 
19
  RUN poetry install --no-interaction --no-ansi
20
 
 
14
 
15
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
 
17
+ RUN useradd -m -u 1000 user
18
+
19
+ USER user
20
+
21
+ ENV HOME=/home/user \
22
+ PATH=/home/user/.local/bin:$PATH
23
+
24
+ WORKDIR $HOME/app
25
+
26
+ COPY --chown=user ./app $HOME/app
27
 
28
  RUN poetry install --no-interaction --no-ansi
29