From cd4ca0e8fdf89a1d47e36c6d8d81c679f16d9d33 Mon Sep 17 00:00:00 2001 From: Anikesh Suresh Date: Mon, 25 Nov 2024 14:06:10 +0000 Subject: [PATCH] add production dockerfile and multi-stage build for installations #5 --- Dockerfile.prod | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile.prod b/Dockerfile.prod index 5ec8e63..3c929bf 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,5 +1,4 @@ -FROM python:3.12.7-alpine3.20@sha256:edd1d8559c585e1e9a9b79de44ac27f8ac32cb0c7323e112ae6870ceeecd8dbf - +FROM python:3.12.7-alpine3.20@sha256:edd1d8559c585e1e9a9b79de44ac27f8ac32cb0c7323e112ae6870ceeecd8dbf AS stage1 COPY requirements.txt ./ @@ -12,6 +11,8 @@ FROM python:3.12.7-alpine3.20@sha256:edd1d8559c585e1e9a9b79de44ac27f8ac32cb0c732 WORKDIR /object-storage-api-run +COPY --from=stage1 /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages +COPY --from=stage1 /usr/local/bin /usr/local/bin COPY README.md ./ COPY object_storage_api/ object_storage_api/