Installation for S&D
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

53 lines
1.2 KiB

FROM rcarjan/nginx-php:7.4
LABEL maintainer="Radu Liviu Carjan"
## Add required files
RUN mkdir /var/www/dewarp
ADD dewarp /var/www/dewarp
## Install libreoffice
RUN apt-add-repository -y ppa:libreoffice/ppa && \
apt-get install -y \
libreoffice \
software-properties-common
# Install python & popple PDF convertor
RUN add-apt-repository -y ppa:deadsnakes/ppa && \
apt-get install -y \
supervisor \
python3.8 \
python3.8-dev \
python3.8-distutils \
libpoppler-cpp-dev \
poppler-utils
## Install Tesseract OCR, Pandoc & other dependencies
RUN add-apt-repository -y ppa:alex-p/tesseract-ocr-devel && \
apt-get install -y \
tesseract-ocr \
unpaper \
unoconv \
pandoc
## Configure correct python version, install PIP
RUN rm /usr/bin/python3 && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
apt-get install -y python-is-python3 && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py && \
rm -rf get-pip.py && \
pip install --upgrade pip
## Install PIP packages
RUN pip install \
pdftotext \
supervisor \
opencv-python
WORKDIR /var/www/dewarp
RUN pip install -r requirements.txt
RUN mkdir /var/log/queue
WORKDIR /var/www/ingest