Spaces:
Paused
Paused
:gem: [Feature] Dockerfile: User scope settings
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
FROM python:3.11-slim
|
2 |
-
|
|
|
|
|
|
|
|
|
3 |
COPY requirements.txt .
|
4 |
RUN pip install -r requirements.txt
|
5 |
-
COPY .
|
6 |
VOLUME /data
|
7 |
EXPOSE 22222
|
8 |
CMD ["python", "-m", "apis.chat_api"]
|
|
|
1 |
FROM python:3.11-slim
|
2 |
+
RUN useradd -m -u 1000 user
|
3 |
+
USER user
|
4 |
+
ENV HOME=/home/user
|
5 |
+
ENV PATH=/home/user/.local/bin:$PATH
|
6 |
+
WORKDIR $HOME/app
|
7 |
COPY requirements.txt .
|
8 |
RUN pip install -r requirements.txt
|
9 |
+
COPY --chown=user . $HOME/app
|
10 |
VOLUME /data
|
11 |
EXPOSE 22222
|
12 |
CMD ["python", "-m", "apis.chat_api"]
|