-
-
Notifications
You must be signed in to change notification settings - Fork 917
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding missing file Dockerfile.tess4
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |