From 49a29221f519fd7befd794255041db9576acdd1f Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Fri, 23 Sep 2022 21:20:32 +0100 Subject: [PATCH] Use poetry base image --- Dockerfile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b0ae7c0..37c1ee1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,10 @@ -FROM --platform=linux/amd64 python:3.9-slim-buster +FROM --platform=linux/amd64 ghcr.io/chrislovering/python-poetry-base:3.10-slim WORKDIR /app +COPY pyproject.toml poetry.lock ./ +RUN poetry install --without dev -RUN pip install poetry +COPY . . -COPY pyproject.toml /app/pyproject.toml - -RUN poetry install --no-dev - -COPY . /app - -CMD ["poetry", "run", "uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "80"] +ENTRYPOINT ["poetry"] +CMD ["run", "uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "80"]