Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
-
WORKDIR /app
|
4 |
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
build-essential \
|
@@ -15,10 +14,14 @@ COPY src/ ./src/
|
|
15 |
RUN pip3 install -r requirements.txt
|
16 |
|
17 |
EXPOSE 8501
|
18 |
-
|
19 |
-
|
20 |
-
ENV HOME=/
|
21 |
-
|
|
|
|
|
|
|
|
|
22 |
|
23 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
24 |
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
|
|
3 |
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
build-essential \
|
|
|
14 |
RUN pip3 install -r requirements.txt
|
15 |
|
16 |
EXPOSE 8501
|
17 |
+
RUN useradd -m -u 1000 user
|
18 |
+
USER user
|
19 |
+
ENV HOME=/home/user \
|
20 |
+
PATH=/home/user/.local/bin:$PATH
|
21 |
+
|
22 |
+
WORKDIR $HOME/app
|
23 |
+
|
24 |
+
COPY --chown=user . $HOME/app
|
25 |
|
26 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
27 |
|