Commit 15c94dc7ca4dc352f472e6f9ba9abaa273b8415a
1 parent
c7dd64c8
Exists in
master
and in
1 other branch
Organização do script inicial do OCR-Server
Showing
1 changed file
with
33 additions
and
34 deletions
Show diff stats
Dockerfile
1 | 1 | FROM ubuntu |
2 | 2 | |
3 | -RUN apt-get -y update | |
4 | -RUN apt-get -y install libfile-find-rule-perl libfile-find-rule-perl-perl imagemagick gettext tesseract-ocr-por tesseract-ocr-eng pdftk poppler-utils unpaper | |
5 | - | |
6 | -RUN apt-get -y install git | |
7 | -RUN git clone https://github.com/coherentgraphics/cpdf-binaries.git | |
8 | -RUN cp cpdf-binaries/Linux-Intel-64bit/cpdf /usr/bin | |
9 | - | |
10 | -RUN useradd -m ocr | |
11 | - | |
12 | 3 | COPY usr/local/bin/ocr /usr/local/bin/ocr |
13 | -RUN chmod +x /usr/local/bin/ocr | |
14 | 4 | COPY etc/init.d/ocr-ubuntu /etc/init.d/ocr |
5 | +COPY entrypoint.sh /entrypoint.sh | |
15 | 6 | |
16 | -RUN chmod +x /etc/init.d/ocr; update-rc.d ocr defaults | |
17 | - | |
18 | -RUN apt-get -y install build-essential | |
19 | -RUN perl -MCPAN -e 'install File::Touch' | |
7 | +RUN useradd -m ocr | |
20 | 8 | |
21 | -RUN mkdir /var/ocr-server/ | |
22 | -RUN mkdir -p /var/ocr-server/Entrada | |
23 | -RUN mkdir -p /var/ocr-server/Saida | |
24 | -RUN mkdir -p /var/ocr-server/Originais_Processados | |
25 | -RUN mkdir -p /var/ocr-server/Erro | |
26 | -COPY entrypoint.sh /entrypoint.sh | |
9 | +RUN apt-get -y update && \ | |
10 | + apt-get -y install libfile-find-rule-perl libfile-find-rule-perl-perl imagemagick tesseract-ocr \ | |
11 | + gettext tesseract-ocr-por tesseract-ocr-eng pdftk poppler-utils unpaper git build-essential | |
12 | + | |
13 | +RUN git clone https://github.com/coherentgraphics/cpdf-binaries.git && \ | |
14 | + cp cpdf-binaries/Linux-Intel-64bit/cpdf /usr/bin | |
15 | + | |
16 | +RUN perl -MCPAN -e 'install File::Touch' && \ | |
17 | + perl -MCPAN -e 'install File::Find::Rule;' && \ | |
18 | + perl -MCPAN -e 'install File::Touch;' && \ | |
19 | + perl -MCPAN -e 'install Sys::Syslog;' && \ | |
20 | + perl -MCPAN -e 'install IPC::Open3;' && \ | |
21 | + perl -MCPAN -e 'install IO::Select;' | |
22 | + | |
23 | +RUN chmod +x /usr/local/bin/ocr && \ | |
24 | + chmod +x /etc/init.d/ocr && \ | |
25 | + update-rc.d ocr defaults | |
26 | + | |
27 | +RUN mkdir /var/ocr-server/ && \ | |
28 | + mkdir -p /var/ocr-server/Entrada && \ | |
29 | + mkdir -p /var/ocr-server/Saida && \ | |
30 | + mkdir -p /var/ocr-server/Originais_Processados && \ | |
31 | + mkdir -p /var/ocr-server/Erro | |
27 | 32 | RUN chmod +x entrypoint.sh |
28 | 33 | |
29 | -RUN perl -MCPAN -e 'install File::Find::Rule;' | |
30 | -RUN perl -MCPAN -e 'install File::Touch;' | |
31 | -RUN perl -MCPAN -e 'install Sys::Syslog;' | |
32 | -RUN perl -MCPAN -e 'install IPC::Open3;' | |
33 | -RUN perl -MCPAN -e 'install IO::Select;' | |
34 | - | |
35 | -RUN apt-get -y install tesseract-ocr | |
36 | -RUN ln -s /usr/bin/pdftk /usr/local/bin/pdftk | |
37 | -RUN ln -s /usr/bin/pdfimages /usr/local/bin/pdfimages | |
38 | -RUN ln -s /usr/bin/tesseract /usr/local/bin/tesseract | |
39 | -RUN ln -s /usr/bin/pdfinfo /usr/local/bin/pdfinfo | |
40 | -RUN ln -s /usr/bin/pdffonts /usr/local/bin/pdffonts | |
41 | -RUN ln -s /usr/bin/pdftoppm /usr/local/bin/pdftoppm | |
42 | -RUN ln -s /usr/bin/cpdf /usr/local/bin/cpdf | |
34 | +RUN ln -s /usr/bin/pdftk /usr/local/bin/pdftk && \ | |
35 | + ln -s /usr/bin/pdfimages /usr/local/bin/pdfimages && \ | |
36 | + ln -s /usr/bin/tesseract /usr/local/bin/tesseract && \ | |
37 | + ln -s /usr/bin/pdfinfo /usr/local/bin/pdfinfo && \ | |
38 | + ln -s /usr/bin/pdffonts /usr/local/bin/pdffonts && \ | |
39 | + ln -s /usr/bin/pdftoppm /usr/local/bin/pdftoppm && \ | |
40 | + ln -s /usr/bin/cpdf /usr/local/bin/cpdf | |
43 | 41 | |
44 | 42 | VOLUME /var/ocr-server/ |
43 | + | |
45 | 44 | CMD ["bash", "entrypoint.sh"] |
46 | 45 | ... | ... |