Jori Geysen commited on
Commit
05dd3f9
1 Parent(s): 74b7fbb

add user to Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -3
Dockerfile CHANGED
@@ -1,10 +1,19 @@
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
 
 
1
  FROM python:3.9
2
 
3
+ RUN useradd -m -u 1000 user
4
 
5
+ USER user
6
 
7
+ ENV HOME=/home/user \
8
+ PATH=/home/user/.local/bin:$PATH
9
+
10
+ WORKDIR $HOME/app
11
+
12
+ COPY --chown=user . $HOME/app
13
+
14
+ COPY ./requirements.txt /app/requirements.txt
15
+
16
+ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
17
 
18
  COPY . .
19