From 84e0b4caa7372840d7a17cf1c982eb3e8e9cf19e Mon Sep 17 00:00:00 2001 From: Connor Yoh Date: Sat, 15 Feb 2025 16:58:41 +0000 Subject: [PATCH] Replaced pip breaking installs of dependencies with APK Edge versions --- Dockerfile | 54 ++++++++++++++++++++++----------------------- Dockerfile.fat | 60 ++++++++++++++++++++++++++------------------------ 2 files changed, 58 insertions(+), 56 deletions(-) diff --git a/Dockerfile b/Dockerfile index d99153d23..ab2fb6991 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,38 +44,38 @@ RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /et echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" | tee -a /etc/apk/repositories && \ apk upgrade --no-cache -a && \ apk add --no-cache \ - ca-certificates \ - tzdata \ - tini \ - bash \ - curl \ - qpdf \ - shadow \ - su-exec \ - openssl \ - openssl-dev \ - openjdk21-jre \ -# Doc conversion - gcompat \ - libc6-compat \ - libreoffice \ -# pdftohtml - poppler-utils \ -# OCR MY PDF (unpaper for descew and other advanced features) - tesseract-ocr-data-eng \ -# CV - py3-opencv \ -# python3/pip - python3 \ - py3-pip && \ -# uno unoconv and HTML - pip install --break-system-packages --no-cache-dir --upgrade unoconv WeasyPrint pdf2image pillow && \ + ca-certificates \ + tzdata \ + tini \ + bash \ + curl \ + qpdf \ + shadow \ + su-exec \ + openssl \ + openssl-dev \ + openjdk21-jre \ + # Doc conversion + gcompat \ + libc6-compat \ + libreoffice \ + # pdftohtml + poppler-utils \ + # OCR MY PDF (unpaper for descew and other advanced features) + tesseract-ocr-data-eng \ + # CV + py3-opencv \ + python3 \ + -X https://dl-cdn.alpinelinux.org/alpine/edge/testing py3-unoconv \ + -X https://dl-cdn.alpinelinux.org/alpine/edge/testing py3-pillow \ + -X https://dl-cdn.alpinelinux.org/alpine/edge/testing py3-pdf2image \ + -X https://dl-cdn.alpinelinux.org/alpine/edge/community weasyprint && \ mv /usr/share/tessdata /usr/share/tessdata-original && \ mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders && \ fc-cache -f -v && \ chmod +x /scripts/* && \ chmod +x /scripts/init.sh && \ -# User permissions + # User permissions addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline && \ chown stirlingpdfuser:stirlingpdfgroup /app.jar diff --git a/Dockerfile.fat b/Dockerfile.fat index 97e328501..2bd6f4d27 100644 --- a/Dockerfile.fat +++ b/Dockerfile.fat @@ -9,7 +9,7 @@ COPY . . # Build the application with DOCKER_ENABLE_SECURITY=false RUN DOCKER_ENABLE_SECURITY=true \ -./gradlew clean build + ./gradlew clean build # Main stage FROM alpine:3.21.2@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099 @@ -46,39 +46,41 @@ RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /et echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" | tee -a /etc/apk/repositories && \ apk upgrade --no-cache -a && \ apk add --no-cache \ - ca-certificates \ - tzdata \ - tini \ - bash \ - curl \ - shadow \ - su-exec \ - openssl \ - openssl-dev \ - openjdk21-jre \ -# Doc conversion - gcompat \ - libc6-compat \ - libreoffice \ -# pdftohtml - poppler-utils \ -# OCR MY PDF (unpaper for descew and other advanced featues) - qpdf \ - tesseract-ocr-data-eng \ - font-terminus font-dejavu font-noto font-noto-cjk font-awesome font-noto-extra \ -# CV - py3-opencv \ -# python3/pip - python3 \ - py3-pip && \ -# uno unoconv and HTML - pip install --break-system-packages --no-cache-dir --upgrade unoconv WeasyPrint pdf2image pillow && \ + ca-certificates \ + tzdata \ + tini \ + bash \ + curl \ + shadow \ + su-exec \ + openssl \ + openssl-dev \ + openjdk21-jre \ + # Doc conversion + gcompat \ + libc6-compat \ + libreoffice \ + # pdftohtml + poppler-utils \ + # OCR MY PDF (unpaper for descew and other advanced featues) + qpdf \ + tesseract-ocr-data-eng \ + font-terminus font-dejavu font-noto font-noto-cjk font-awesome font-noto-extra \ + # CV + py3-opencv \ + # python3/pip + python3 \ + -X https://dl-cdn.alpinelinux.org/alpine/edge/testing py3-unoconv \ + -X https://dl-cdn.alpinelinux.org/alpine/edge/testing py3-pillow \ + -X https://dl-cdn.alpinelinux.org/alpine/edge/testing py3-pdf2image \ + -X https://dl-cdn.alpinelinux.org/alpine/edge/community weasyprint && \ + # uno unoconv and HTML mv /usr/share/tessdata /usr/share/tessdata-original && \ mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders && \ fc-cache -f -v && \ chmod +x /scripts/* && \ chmod +x /scripts/init.sh && \ -# User permissions + # User permissions addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline && \ chown stirlingpdfuser:stirlingpdfgroup /app.jar