From edc088f038c25af16d6ab7ee60e71b2a4ad08be6 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 8 Jan 2024 20:26:09 +0530 Subject: [PATCH] build(Dockerfile): pip install from wheels not re-install requirements.txt reduce size of dockerbuild n --- Dockerfile.database | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile.database b/Dockerfile.database index 61b22c27b..6791dc1a2 100644 --- a/Dockerfile.database +++ b/Dockerfile.database @@ -45,9 +45,7 @@ COPY --from=builder /app/dist/*.whl . COPY --from=builder /wheels/ /wheels/ # Install the built wheel using pip; again using a wildcard if it's the only file -RUN pip install --no-cache-dir --find-links=/wheels/ -r requirements.txt \ - && pip install *.whl \ - && rm -f *.whl +RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl && rm -rf /wheels # Generate prisma client RUN prisma generate