This commit is contained in:
2025-11-28 02:16:49 +01:00
parent 026eb05912
commit b1295f4329

View File

@@ -5,13 +5,16 @@ COPY pom.xml .
COPY src ./src COPY src ./src
RUN mvn clean package -DskipTests RUN mvn clean package -DskipTests
# Runtime stage # Runtime stage - using headless JRE to reduce size
FROM eclipse-temurin:11-jre FROM eclipse-temurin:11-jre-jammy
WORKDIR /app WORKDIR /app
# Install OpenCV native libraries # Install minimal OpenCV runtime libraries (not the full dev package)
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y libopencv-dev && \ apt-get install -y --no-install-recommends \
libopencv-core4.5d \
libopencv-imgcodecs4.5d \
libopencv-dnn4.5d && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Copy the JAR file # Copy the JAR file