Update Dockerfile
Browse files- Dockerfile +2 -9
Dockerfile
CHANGED
@@ -1,8 +1,6 @@
|
|
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 |
|
@@ -11,15 +9,10 @@ ENV PYTHONUNBUFFERED=1
|
|
11 |
|
12 |
# Install pip requirements
|
13 |
COPY requirements.txt .
|
14 |
-
RUN
|
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 ["
|
|
|
1 |
# For more information, please refer to https://aka.ms/vscode-docker-python
|
2 |
FROM python:3-slim
|
3 |
|
|
|
|
|
4 |
# Keeps Python from generating .pyc files in the container
|
5 |
ENV PYTHONDONTWRITEBYTECODE=1
|
6 |
|
|
|
9 |
|
10 |
# Install pip requirements
|
11 |
COPY requirements.txt .
|
12 |
+
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
13 |
|
14 |
WORKDIR /app
|
15 |
COPY . /app
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
|
18 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|