From 6053d1b4ec3643f32a9789e25a85fe2cb8a75c3b Mon Sep 17 00:00:00 2001 From: Cole Deck Date: Fri, 15 Mar 2024 21:02:59 -0500 Subject: [PATCH] Update Dockerfile with runtime dependencies, copy only necessary files --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5bb7116..a465d74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ -FROM python:latest +FROM python:3.11-slim -RUN apt-get update && apt-get install -y libgl1-mesa-glx ghostscript && apt-get clean && rm -rf /var/lib/apt/lists -COPY . . +# Get runtime dependencies +# glx for OpenCV, ghostscript for datasheet PDF rendering, zbar for barcode scanning, git for cloning repos +RUN apt-get update && apt-get install -y libgl1-mesa-glx ghostscript libzbar0 git && apt-get clean && rm -rf /var/lib/apt/lists +COPY *.py *.yml *.sh *.txt *.html static templates ./ #COPY config-server.yml config.yml RUN pip3 install -r requirements.txt