Skip to content

Commit

Permalink
Adding missing file Dockerfile.tess4
Browse files Browse the repository at this point in the history
  • Loading branch information
James R. Barlow committed Jan 30, 2017
1 parent 005216b commit fa82b50
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Dockerfile.tess4
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# OCRmyPDF
#
# VERSION 4.4.1
FROM ubuntu:16.10
MAINTAINER James R. Barlow <jim@purplerock.ca>

RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common python-software-properties \
python3-wheel \
python3-reportlab \
python3-venv \
ghostscript \
qpdf \
poppler-utils \
unpaper \
libffi-dev

RUN add-apt-repository ppa:alex-p/tesseract-ocr

RUN apt-get update && apt-get install -y --no-install-recommends \
tesseract-ocr-all

RUN python3 -m venv --system-site-packages /appenv

COPY . /application

# This installs the latest binary wheel instead of the code in the current
# folder. cffi needs gcc otherwise.
RUN . /appenv/bin/activate; \
pip install --upgrade pip \
&& pip install ocrmypdf \
&& pip install -r /application/test_requirements.txt

# Remove the junk, including the source version of application
RUN apt-get autoremove -y && apt-get clean -y
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/* /application/ocrmypdf

RUN useradd docker \
&& mkdir /home/docker \
&& chown docker:docker /home/docker

USER docker
WORKDIR /home/docker

# Must use array form of ENTRYPOINT
# Non-array form does not append other arguments, because that is "intuitive"
ENTRYPOINT ["/application/docker-wrapper.sh"]

0 comments on commit fa82b50

Please sign in to comment.