Kaelan
commited on
Commit
·
d5d550f
1
Parent(s):
b04a427
add user to dockerfile
Browse files- Dockerfile +10 -1
Dockerfile
CHANGED
|
@@ -14,11 +14,20 @@ COPY . /app
|
|
| 14 |
|
| 15 |
RUN pip3 install -r requirements.txt
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
EXPOSE 8501
|
| 18 |
|
| 19 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 20 |
|
| 21 |
-
WORKDIR /app
|
|
|
|
|
|
|
| 22 |
RUN mkdir ./models && chmod 777 ./models
|
| 23 |
|
| 24 |
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 14 |
|
| 15 |
RUN pip3 install -r requirements.txt
|
| 16 |
|
| 17 |
+
RUN useradd -m -u 1000 user
|
| 18 |
+
|
| 19 |
+
USER user
|
| 20 |
+
|
| 21 |
+
ENV HOME=/home/user \
|
| 22 |
+
PATH=/home/user/.local/bin:$PATH
|
| 23 |
+
|
| 24 |
EXPOSE 8501
|
| 25 |
|
| 26 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 27 |
|
| 28 |
+
WORKDIR $HOME/app
|
| 29 |
+
COPY --chown=user . $HOME/app
|
| 30 |
+
|
| 31 |
RUN mkdir ./models && chmod 777 ./models
|
| 32 |
|
| 33 |
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|