2015-07-16 19:50:06 +08:00
|
|
|
#
|
|
|
|
# Dockerfile for tesseract
|
|
|
|
#
|
|
|
|
|
2015-07-16 20:02:40 +08:00
|
|
|
FROM debian:jessie
|
2017-05-08 07:05:07 +08:00
|
|
|
MAINTAINER kev <noreply@easypi.pro>
|
2015-07-16 19:50:06 +08:00
|
|
|
|
2016-05-17 10:42:00 +08:00
|
|
|
RUN set -xe \
|
|
|
|
&& apt-get update \
|
2015-07-16 20:02:40 +08:00
|
|
|
&& apt-get install -y autoconf \
|
|
|
|
build-essential \
|
|
|
|
git \
|
2016-07-08 21:01:29 +08:00
|
|
|
libcairo2 \
|
|
|
|
libcairo2-dev \
|
|
|
|
libgomp1 \
|
|
|
|
libicu52 \
|
|
|
|
libicu-dev \
|
2015-07-16 20:06:17 +08:00
|
|
|
liblept4 \
|
|
|
|
libleptonica-dev \
|
2016-07-08 21:01:29 +08:00
|
|
|
libpango1.0-0 \
|
|
|
|
libpango1.0-dev \
|
2015-07-16 20:02:40 +08:00
|
|
|
libtool \
|
2015-07-16 19:50:06 +08:00
|
|
|
&& git clone https://github.com/tesseract-ocr/tesseract.git \
|
2015-07-16 22:44:23 +08:00
|
|
|
&& cd tesseract \
|
|
|
|
&& ./autogen.sh \
|
|
|
|
&& ./configure \
|
|
|
|
&& make install \
|
|
|
|
&& cd .. \
|
2015-07-16 21:39:01 +08:00
|
|
|
&& git clone https://github.com/tesseract-ocr/tessdata.git \
|
2015-07-16 22:44:23 +08:00
|
|
|
&& cd tessdata \
|
2015-07-16 23:01:57 +08:00
|
|
|
&& mv * /usr/local/share/tessdata/ \
|
2015-07-16 22:44:23 +08:00
|
|
|
&& cd .. \
|
2015-07-16 20:02:40 +08:00
|
|
|
&& apt-get purge --auto-remove -y autoconf \
|
|
|
|
build-essential \
|
|
|
|
git \
|
2016-07-08 21:01:29 +08:00
|
|
|
libcairo2-dev \
|
|
|
|
libicu-dev \
|
2015-07-16 20:06:17 +08:00
|
|
|
libleptonica-dev \
|
2016-07-08 21:01:29 +08:00
|
|
|
libpango1.0-dev \
|
2015-07-16 22:44:23 +08:00
|
|
|
libtool \
|
|
|
|
&& rm -rf tesseract tessdata /var/cache/apk/*
|
2015-07-16 19:50:06 +08:00
|
|
|
|
|
|
|
ENTRYPOINT ["tesseract"]
|
|
|
|
CMD ["-h"]
|
|
|
|
|