From f78745ef7bfab437253adbdf3aca24f6ec1aca03 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 16 Oct 2023 23:25:24 +0200 Subject: [PATCH] update Dockerfile for backend python --- Dockerfile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index c3cd200..d7b455a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,11 @@ -FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11-slim AS backend-builder +FROM python:3.11.6-alpine3.18 WORKDIR /app COPY requierements.txt /app/ - - -RUN pip install --upgrade pip -RUN pip install -r requierements.txt - -# Create the final image -FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11-slim - -WORKDIR /app - -COPY --from=backend-builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages COPY app /app/app +RUN pip install --upgrade pip && pip install -r requierements.txt + + CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file