Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +15 -11
Dockerfile
CHANGED
@@ -1,16 +1,20 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
|
4 |
-
COPY requirements.txt /app/
|
5 |
-
RUN pip install -r /app/requirements.txt
|
6 |
|
7 |
-
|
8 |
-
COPY app_name /app/app_name/
|
9 |
-
COPY static/ /app/static/
|
10 |
-
COPY templates/ /app/templates/
|
11 |
|
12 |
-
|
13 |
-
WORKDIR /app/app_name
|
14 |
|
15 |
-
#
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
WORKDIR /code
|
|
|
|
|
4 |
|
5 |
+
COPY ./requirements.txt /code/requirements.txt
|
|
|
|
|
|
|
6 |
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
|
8 |
|
9 |
+
# Switch to the "user" user
|
10 |
+
RUN useradd -m -u 1000 user
|
11 |
+
USER user
|
12 |
+
ENV HOME=/home/user \
|
13 |
+
PATH=/home/user/.local/bin:$PATH
|
14 |
+
|
15 |
+
|
16 |
+
COPY . .
|
17 |
+
|
18 |
+
EXPOSE 7860
|
19 |
+
|
20 |
+
CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|