Arafath10 commited on
Commit
1e40ef8
1 Parent(s): ff9efc0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -0
Dockerfile CHANGED
@@ -8,6 +8,15 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
  COPY ./main.py /code/app/main.py
10
 
 
 
 
 
 
 
 
 
 
11
  # Get secret EXAMPLE and output it to /test at buildtime
12
  # RUN --mount=type=secret,id=EXAMPLE,mode=0444,required=true \
13
  # cat /run/secrets/EXAMPLE > /test
 
8
 
9
  COPY ./main.py /code/app/main.py
10
 
11
+ RUN useradd -m -u 1000 user
12
+ USER user
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH
15
+
16
+ WORKDIR $HOME/app
17
+
18
+ COPY --chown=user . $HOME/app
19
+
20
  # Get secret EXAMPLE and output it to /test at buildtime
21
  # RUN --mount=type=secret,id=EXAMPLE,mode=0444,required=true \
22
  # cat /run/secrets/EXAMPLE > /test