From 129294a8c78a86c92495f8ad292fd56d2c33feb9 Mon Sep 17 00:00:00 2001 From: RTAkland Date: Thu, 29 Aug 2024 22:54:58 +0800 Subject: [PATCH] chore: update Dockerfile --- Dockerfile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 02e4415..82bb14d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,13 @@ -FROM ubuntu:latest -EXPOSE 8000 -WORKDIR . +FROM python:3.11-slim + +WORKDIR /app + +COPY requirements.txt . + +RUN pip install --no-cache-dir -r requirements.txt + COPY . . -RUN apt-get -y update && apt-get -y install python3-pip && pip3 install -r requirements.txt -CMD ["uvicorn", "src:create_app", "--host=0.0.0.0", "--port=8000"] \ No newline at end of file + +EXPOSE 8000 + +CMD ["uvicorn", "src:create_app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file