Spaces:
Sleeping
Sleeping
Update docker file to create new user
Browse files- Dockerfile +10 -1
Dockerfile
CHANGED
@@ -14,7 +14,16 @@ RUN poetry install --no-interaction --no-ansi --no-root
|
|
14 |
|
15 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
16 |
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
RUN poetry install --no-interaction --no-ansi
|
20 |
|
|
|
14 |
|
15 |
RUN pip install --no-cache-dir --upgrade -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 |
+
WORKDIR $HOME/app
|
25 |
+
|
26 |
+
COPY --chown=user ./app $HOME/app
|
27 |
|
28 |
RUN poetry install --no-interaction --no-ansi
|
29 |
|