Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -4
Dockerfile
CHANGED
@@ -1,12 +1,20 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
WORKDIR /code
|
4 |
|
5 |
-
|
|
|
6 |
|
7 |
-
|
|
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|