Update Dockerfile
Browse files- Dockerfile +8 -6
Dockerfile
CHANGED
@@ -1,12 +1,14 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
|
4 |
-
|
|
|
5 |
|
6 |
-
COPY ./requirements.txt /
|
7 |
|
8 |
-
RUN pip install --no-cache-dir --upgrade -r /
|
|
|
|
|
|
|
9 |
|
10 |
-
COPY . .
|
11 |
-
CMD chmod -R 777 /code
|
12 |
CMD ["python", "run.py"]
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
RUN useradd -m -u 1000 user
|
4 |
+
USER user
|
5 |
+
WORKDIR /home/user
|
6 |
|
7 |
+
COPY ./requirements.txt /home/user/requirements.txt
|
8 |
|
9 |
+
RUN pip install --no-cache-dir --upgrade -r /home/user/requirements.txt
|
10 |
+
|
11 |
+
COPY --chown=user . .
|
12 |
+
CMD chmod -R 777 /home/user
|
13 |
|
|
|
|
|
14 |
CMD ["python", "run.py"]
|