khawir commited on
Commit
85244c6
·
verified ·
1 Parent(s): b1b9dab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -1
Dockerfile CHANGED
@@ -9,7 +9,15 @@ COPY ./requirements.txt /code/requirements.txt
9
 
10
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
 
12
- COPY . .
 
 
 
 
 
 
 
 
13
 
14
  RUN --mount=type=secret,id=SECRET_KEY,mode=0444,required=true
15
  RUN --mount=type=secret,id=ALGORITHM,mode=0444,required=true
 
9
 
10
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
 
12
+ RUN useradd -m -u 1000 user
13
+ USER user
14
+
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH
17
+
18
+ WORKDIR $HOME/app
19
+
20
+ COPY --chown=user . $HOME/app
21
 
22
  RUN --mount=type=secret,id=SECRET_KEY,mode=0444,required=true
23
  RUN --mount=type=secret,id=ALGORITHM,mode=0444,required=true