Spaces:
Runtime error
Runtime error
Jori Geysen
commited on
Commit
•
05dd3f9
1
Parent(s):
74b7fbb
add user to Dockerfile
Browse files- Dockerfile +12 -3
Dockerfile
CHANGED
@@ -1,10 +1,19 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
COPY . .
|
10 |
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
RUN useradd -m -u 1000 user
|
4 |
|
5 |
+
USER user
|
6 |
|
7 |
+
ENV HOME=/home/user \
|
8 |
+
PATH=/home/user/.local/bin:$PATH
|
9 |
+
|
10 |
+
WORKDIR $HOME/app
|
11 |
+
|
12 |
+
COPY --chown=user . $HOME/app
|
13 |
+
|
14 |
+
COPY ./requirements.txt /app/requirements.txt
|
15 |
+
|
16 |
+
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
17 |
|
18 |
COPY . .
|
19 |
|