Spaces:
Runtime error
Runtime error
camphong24032002
commited on
Commit
•
18d6795
1
Parent(s):
87a7ec3
Test
Browse files- Dockerfile +4 -9
Dockerfile
CHANGED
@@ -1,21 +1,16 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
RUN
|
4 |
-
|
5 |
-
&& rm -rf /var/lib/apt/lists/*
|
6 |
|
7 |
WORKDIR /code
|
8 |
|
9 |
COPY ./requirements.txt /code/requirements.txt
|
10 |
|
11 |
-
RUN
|
12 |
|
13 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
14 |
|
15 |
-
COPY .
|
16 |
-
|
17 |
-
RUN chown -R 1000:1000 /code
|
18 |
-
|
19 |
-
USER 1000
|
20 |
|
21 |
CMD ["python", "app.py"]
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
RUN useradd -m -u 1000 user
|
4 |
+
USER user
|
|
|
5 |
|
6 |
WORKDIR /code
|
7 |
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
+
RUN chown -R user:user /code
|
11 |
|
12 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
13 |
|
14 |
+
COPY --chown=user:user . /code
|
|
|
|
|
|
|
|
|
15 |
|
16 |
CMD ["python", "app.py"]
|