Spaces:
Running
Running
tomas-gajarsky
commited on
Commit
·
c959ace
1
Parent(s):
89bddf5
Update Dockerfile
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
FROM python:3.9.12-slim
|
2 |
|
|
|
|
|
3 |
WORKDIR /code
|
|
|
|
|
4 |
|
5 |
COPY requirements.txt $WORKDIR/requirements.txt
|
6 |
|
@@ -9,6 +13,8 @@ RUN pip install --no-cache-dir --upgrade -r $WORKDIR/requirements.txt
|
|
9 |
|
10 |
COPY . .
|
11 |
|
|
|
|
|
12 |
EXPOSE 7860
|
13 |
|
14 |
ENTRYPOINT ["python", "app.py"]
|
|
|
1 |
FROM python:3.9.12-slim
|
2 |
|
3 |
+
RUN useradd -ms /bin/bash admin
|
4 |
+
|
5 |
WORKDIR /code
|
6 |
+
RUN chown -R admin:admin $WORKDIR
|
7 |
+
RUN chmod 755 $WORKDIR
|
8 |
|
9 |
COPY requirements.txt $WORKDIR/requirements.txt
|
10 |
|
|
|
13 |
|
14 |
COPY . .
|
15 |
|
16 |
+
USER admin
|
17 |
+
|
18 |
EXPOSE 7860
|
19 |
|
20 |
ENTRYPOINT ["python", "app.py"]
|