Dockerfile: Split out COPY of pyproject.toml

This way, the `poetry install` gets cached properly and doesn't run
every time.

Signed-off-by: Matthew Cengia <mattcen@mattcen.com>
This commit is contained in:
Matthew Cengia
2023-03-19 17:31:04 +11:00
parent 413b1cd0f3
commit cf5cf4e18a

View File

@@ -20,8 +20,9 @@ RUN poetry config virtualenvs.in-project true
WORKDIR ${WORKDIR}
COPY --chown=1000:1000 . .
COPY --chown=1000:1000 pyproject.toml .
RUN poetry install --only main
COPY --chown=1000:1000 . .
# END Builder
FROM python:3.11-alpine