Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -4
Dockerfile
CHANGED
@@ -1,11 +1,19 @@
|
|
|
|
|
|
1 |
# Use the official Python 3.10.14 image
|
2 |
FROM python:3.10.14
|
3 |
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
# Set the working directory to
|
8 |
-
WORKDIR /
|
9 |
|
10 |
# Install requirements.txt
|
11 |
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
|
|
1 |
+
|
2 |
+
|
3 |
# Use the official Python 3.10.14 image
|
4 |
FROM python:3.10.14
|
5 |
|
6 |
+
RUN useradd -m -u 1000 user
|
7 |
+
|
8 |
+
# Switch to the "user" user
|
9 |
+
USER user
|
10 |
+
|
11 |
+
# Set home to the user's home directory
|
12 |
+
ENV HOME=/home/user \
|
13 |
+
PATH=/home/user/.local/bin:$PATH
|
14 |
|
15 |
+
# Set the working directory to the user's home directory
|
16 |
+
WORKDIR $HOME/app
|
17 |
|
18 |
# Install requirements.txt
|
19 |
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|