Stirling-PDF/DockerfileBase

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.3 KiB
Text
Raw Permalink Normal View History

2023-05-01 22:57:48 +02:00
# Main stage
2023-12-10 23:02:30 +01:00
FROM ubuntu:latest AS base
2023-12-11 00:06:35 +01:00
# JDK for app
RUN apt-get update && \
apt-get install -y --no-install-recommends \
openjdk-17-jre && \
rm -rf /var/lib/apt/lists/*
2023-12-11 00:06:35 +01:00
# Doc conversion
RUN apt-get update && \
apt-get install -y --no-install-recommends \
2023-12-16 11:22:33 +01:00
libreoffice-core \
libreoffice-common \
2023-12-16 11:22:33 +01:00
libreoffice-writer \
libreoffice-calc \
libreoffice-impress \
2023-12-11 00:06:35 +01:00
python3-uno \
2023-12-11 10:32:36 +01:00
curl \
unoconv && \
rm -rf /var/lib/apt/lists/*
2023-12-11 00:06:35 +01:00
# OCR MY PDF (unpaper for descew and other advanced featues)
RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common gnupg2 && \
add-apt-repository ppa:alex-p/tesseract-ocr5 && apt install -y --no-install-recommends tesseract-ocr && \
apt-get update && \
apt-get install -y --no-install-recommends \
2023-12-10 23:02:30 +01:00
ghostscript \
2023-05-01 22:57:48 +02:00
python3-pip \
2023-12-10 23:02:30 +01:00
ocrmypdf \
2023-12-11 00:06:35 +01:00
unpaper && \
rm -rf /var/lib/apt/lists/* && \
mv /usr/share/tesseract-ocr /usr/share/tesseract-ocr-original && \
pip install --no-cache-dir --upgrade pip && \
2023-12-10 23:02:30 +01:00
pip install --no-cache-dir --upgrade ocrmypdf && \
2023-12-11 00:06:35 +01:00
pip install --no-cache-dir --upgrade pillow==10.0.1 reportlab==3.6.13 wheel==0.38.1 setuptools==65.5.1 pyjwt==2.4.0 cryptography==39.0.1
2023-12-11 10:57:28 +01:00
#CV and HTML
RUN pip install --no-cache-dir opencv-python-headless WeasyPrint