docker build issue fix

This commit is contained in:
2026-08-22 13:57:57 +05:30
parent f168b12c82
commit 39b125db9a
+3 -7
View File
@@ -64,7 +64,7 @@ COPY gateway/ ./gateway/
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/opt/vcpkg/downloads \
cmake --preset linux-release \
-DPDFENGINE_BUILD_TESTS=ON \
-DPDFENGINE_BUILD_TESTS=OFF \
-DPDFENGINE_WITH_PDFIUM=ON \
-DPDFENGINE_WITH_SKIA=OFF \
-DPDFENGINE_WITH_QPDF=ON \
@@ -72,11 +72,7 @@ RUN --mount=type=cache,target=/root/.cache \
-DCMAKE_SUPPRESS_REGENERATION=ON \
&& cmake --build out/build/linux-release
# Stage 2: Tester
FROM builder AS tester
RUN ctest --test-dir out/build/linux-release --output-on-failure
# Stage 3: Runtime
# Stage 2: Runtime
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
@@ -99,7 +95,7 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*
# Install the extension globally so it's not shadowed by the volume mount ./gateway:/home/app
COPY --from=tester /build/gateway/pdfengine*.so /usr/local/lib/python3.11/site-packages/
COPY --from=builder /build/gateway/pdfengine*.so /usr/local/lib/python3.11/site-packages/
RUN groupadd --system app \
&& useradd --system --gid app --create-home --home-dir /home/app app