File: Dockerfile

package info (click to toggle)
latexml 0.8.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,920 kB
  • sloc: xml: 109,048; perl: 30,224; sh: 179; javascript: 28; makefile: 13
file content (98 lines) | stat: -rw-r--r-- 3,492 bytes parent folder | download | duplicates (4)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

# /=====================================================================\ #
# | LaTeXML Dockerfile                                                  | #
# | A Dockerfile to create a Docker Image with LaTeXML preinstalled.    | #
# |=====================================================================| #
# | Thanks to Tom Wiesing <tom.wiesing@gmail.com>                       | #
# | Part of LaTeXML:                                                    | #
# |  Public domain software, produced as part of work done by the       | #
# |  United States Government & not subject to copyright in the US.     | #
# |---------------------------------------------------------------------| #
# | Bruce Miller <bruce.miller@nist.gov>                        #_#     | #
# | http://dlmf.nist.gov/LaTeXML/                              (o o)    | #
# \=========================================================ooo==U==ooo=/ #

# This Dockerfile expects the root directory of LaTeXML as a build context. 
# To achieve this run the following command from the root directory:
#
# > docker build -t latexml -f release/docker/Dockerfile .

# This Dockerfile can include a full TeXLive installation. 
# This is enabled by default however it can be disabled by providing a
# build argument like so:
#
# > docker build -t latexml --build-arg WITH_TEXLIVE=no -f release/docker/Dockerfile .
#
# Please be aware that including a full TeXLive installation can take a
# significant amount of time (depending on network connection) and will
# increase the image size to several Gigabytes. 
#
# Futhermore to speed up the build process, it is also possible to
# tell docker not to run the tests during the build proess. To achieve
# this, pass --build-arg WITH_TESTS=no to the docker build command, e.g:
#
# > docker build -t latexml --build-arg WITH_TESTS=no -f release/docker/Dockerfile .


# We start from alpine linux 3.10
FROM alpine:3.10

# Install the dependencies
RUN apk add --no-cache \
    db-dev \
    gcc \
    libc-dev \
    libgcrypt \
    libgcrypt-dev \
    libxml2 \
    libxml2-dev \
    libxslt \
    libxslt-dev \
    make \
    perl \
    perl-dev \
    perl-utils \
    wget \
    zlib \
    zlib-dev

# Configure TeXLive Support
# Set to "no" to disable, "yes" to enable
ARG WITH_TEXLIVE="yes"

# Configure if we test during the build
ARG WITH_TESTS="yes"

# Install TeXLive if not disabled
RUN [ "$WITH_TEXLIVE" == "no" ] || (\
           apk add --no-cache -U poppler harfbuzz-icu zziplib texlive-full \
        && ln -s /usr/bin/mktexlsr /usr/bin/mktexlsr.pl \
    )

# Install cpanminus
RUN apk add --no-cache -U perl-app-cpanminus

# Make a directory for latexml
RUN mkdir -p /opt/latexml

# Add all of the source files
ADD bin/            /opt/latexml/bin
#ADD doc/            /opt/latexml/doc/
ADD lib/            /opt/latexml/lib 
#ADD release/        /opt/latexml/release/
ADD t/              /opt/latexml/t/
ADD tools/          /opt/latexml/tools/
#ADD Changes         /opt/latexml/Changes
#ADD INSTALL         /opt/latexml/INSTALL
#ADD INSTALL.SKIP    /opt/latexml/INSTALL.SKIP
ADD LICENSE         /opt/latexml/LICENSE
ADD Makefile.PL     /opt/latexml/Makefile.PL
#ADD MANIFEST        /opt/latexml/MANIFEST
#ADD MANIFEST.SKIP   /opt/latexml/MANIFEST.SKIP
#ADD manual.pdf      /opt/latexml/manual.pdf
#ADD README.pod      /opt/README.pod

# Installing  via cpanm (with or without tests)
WORKDIR /opt/latexml

RUN if [ "$WITH_TESTS" == "no" ] ; then cpanm --notest . ; else cpanm . ; fi