Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +25 -25
Dockerfile
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
# For more information, please refer to https://aka.ms/vscode-docker-python
|
2 |
-
FROM python:3-slim
|
3 |
-
|
4 |
-
EXPOSE 8000
|
5 |
-
|
6 |
-
# Keeps Python from generating .pyc files in the container
|
7 |
-
ENV PYTHONDONTWRITEBYTECODE=1
|
8 |
-
|
9 |
-
# Turns off buffering for easier container logging
|
10 |
-
ENV PYTHONUNBUFFERED=1
|
11 |
-
|
12 |
-
# Install pip requirements
|
13 |
-
COPY requirements.txt .
|
14 |
-
RUN python -m pip install -r requirements.txt
|
15 |
-
|
16 |
-
WORKDIR /app
|
17 |
-
COPY . /app
|
18 |
-
|
19 |
-
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
20 |
-
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
|
21 |
-
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
|
22 |
-
USER appuser
|
23 |
-
|
24 |
-
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
|
25 |
-
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "-k", "uvicorn.workers.UvicornWorker", "-t", "3000" ,"--keep-alive" , "3000","app
|
|
|
1 |
+
# For more information, please refer to https://aka.ms/vscode-docker-python
|
2 |
+
FROM python:3-slim
|
3 |
+
|
4 |
+
EXPOSE 8000
|
5 |
+
|
6 |
+
# Keeps Python from generating .pyc files in the container
|
7 |
+
ENV PYTHONDONTWRITEBYTECODE=1
|
8 |
+
|
9 |
+
# Turns off buffering for easier container logging
|
10 |
+
ENV PYTHONUNBUFFERED=1
|
11 |
+
|
12 |
+
# Install pip requirements
|
13 |
+
COPY requirements.txt .
|
14 |
+
RUN python -m pip install -r requirements.txt
|
15 |
+
|
16 |
+
WORKDIR /app
|
17 |
+
COPY . /app
|
18 |
+
|
19 |
+
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
20 |
+
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
|
21 |
+
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
|
22 |
+
USER appuser
|
23 |
+
|
24 |
+
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
|
25 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "-k", "uvicorn.workers.UvicornWorker", "-t", "3000" ,"--keep-alive" , "3000","app:app"]
|