Update Dockerfile
Browse files- Dockerfile +3 -12
Dockerfile
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
# Use an official Python runtime as the base image
|
2 |
FROM python:3.9-slim
|
3 |
|
4 |
RUN apt-get update && apt-get install -y --no-install-recommends tzdata && \
|
@@ -8,20 +7,12 @@ ENV TZ=Asia/Shanghai
|
|
8 |
|
9 |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
10 |
|
11 |
-
# Set the working directory in the container
|
12 |
WORKDIR /app
|
13 |
|
14 |
-
# Copy the requirements file into the container
|
15 |
-
COPY requirements.txt .
|
16 |
-
|
17 |
-
# Install the required packages
|
18 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
19 |
-
|
20 |
-
# Copy the current directory contents into the container
|
21 |
COPY . .
|
22 |
|
23 |
-
|
|
|
24 |
EXPOSE 8000
|
25 |
|
26 |
-
|
27 |
-
CMD ["uvicorn", "app:asgi_app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
RUN apt-get update && apt-get install -y --no-install-recommends tzdata && \
|
|
|
7 |
|
8 |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
9 |
|
|
|
10 |
WORKDIR /app
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
COPY . .
|
13 |
|
14 |
+
RUN pip install --no-cache-dir flask requests asgiref uvicorn pyjwt
|
15 |
+
|
16 |
EXPOSE 8000
|
17 |
|
18 |
+
CMD ["python", "app.py"]
|
|