Arafath10 commited on
Commit
5dc0ed5
1 Parent(s): 41dc7eb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -4
Dockerfile CHANGED
@@ -1,12 +1,20 @@
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 ./main.py /code/app/main.py
 
 
 
 
 
 
 
10
 
11
 
12
  # Get secret EXAMPLE and output it to /test at buildtime
 
1
  FROM python:3.9
2
 
 
3
 
4
+ # Set up a new user named "user" with user ID 1000
5
+ RUN useradd -m -u 1000 user
6
 
7
+ # Switch to the "user" user
8
+ USER user
9
 
10
+
11
+ COPY --chown=user ./requirements.txt /api/requirements.txt
12
+ COPY --chown=user ./sabiduria_tool_api /api/app
13
+
14
+ WORKDIR /api
15
+
16
+ RUN pip install --upgrade pip
17
+ RUN pip install -r requirements.txt
18
 
19
 
20
  # Get secret EXAMPLE and output it to /test at buildtime