-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
55 lines (41 loc) · 1.32 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i -e 's/# deb-src/deb-src/' /etc/apt/sources.list
RUN apt-get update && apt-get -y upgrade
RUN apt-get -y install djvulibre-bin libtiff-tools ocrodjvu
# <!-- ImageMagick
# Fix for: This version of ImageMagick doesn't support JPEG2000 compression.
RUN apt-get -y build-dep imagemagick
RUN apt-get -y install libopenjp2-7-dev
RUN mkdir /opt/ImageMagick
COPY ImageMagick /opt/ImageMagick
WORKDIR /opt/ImageMagick
RUN ./configure && make install
# -->
# <!-- jbig2
# Fix for: JBIG2 compression has been requested, but the encoder is not available.
RUN apt-get -y install automake libleptonica-dev
RUN mkdir /opt/jbig2enc
COPY jbig2enc /opt/jbig2enc
WORKDIR /opt/jbig2enc
RUN ./autogen.sh && ./configure && make install
# -->
RUN apt-get -y install ruby ruby-dev
RUN gem install iconv pdfbeads
# <!-- Configure JP2 settings
# based on https://github.com/ifad/pdfbeads/issues/3
RUN find / -name 'pdfpage.rb' -exec \
sed -i \
-e "s/'JP2','numrlvls',4/'JP2','numrlvls',4/" \
-e "s/'JP2','rate',0.015625/'JP2','rate',256/" \
{} \;
# -->
# <!-- djvu2pdf
RUN mkdir /opt/djvu2pdf
ENV PATH=/opt/djvu2pdf:$PATH
COPY djvu2pdf /opt/djvu2pdf
# -->
RUN mkdir /opt/work
WORKDIR /opt/work
ENTRYPOINT ["djvu2pdf"]
#modeline vim: set fdm=marker foldmarker=<!--,--> commentstring=\ #%s: