|
15 | 15 | # This Dockerfile expects the root directory of LaTeXML as a build context.
|
16 | 16 | # To achieve this run the following command from the root directory:
|
17 | 17 | #
|
18 |
| -# > docker build -t latexml -f release/Dockerfile . |
| 18 | +# > docker build -t latexml -f release/docker/Dockerfile . |
19 | 19 |
|
20 | 20 | # This Dockerfile can include a full TeXLive installation.
|
21 | 21 | # This is enabled by default however it can be disabled by providing a
|
22 | 22 | # build argument like so:
|
23 | 23 | #
|
24 |
| -# > docker build -t latexml --build-arg WITH_TEXLIVE=no -f release/Dockerfile . |
| 24 | +# > docker build -t latexml --build-arg WITH_TEXLIVE=no -f release/docker/Dockerfile . |
25 | 25 | #
|
26 | 26 | # Please be aware that including a full TeXLive installation can take a
|
27 | 27 | # significant amount of time (depending on network connection) and will
|
28 | 28 | # increase the image size to several Gigabytes.
|
| 29 | +# |
| 30 | +# Futhermore to speed up the build process, it is also possible to |
| 31 | +# tell docker not to run the tests during the build proess. To achieve |
| 32 | +# this, pass --build-arg WITH_TESTS=no to the docker build command, e.g: |
| 33 | +# |
| 34 | +# > docker build -t latexml --build-arg WITH_TESTS=no -f release/docker/Dockerfile . |
| 35 | + |
29 | 36 |
|
30 | 37 | # We start from alpine linux 3.10
|
31 | 38 | FROM alpine:3.10
|
@@ -53,6 +60,9 @@ RUN apk add --no-cache \
|
53 | 60 | # Set to "no" to disable, "yes" to enable
|
54 | 61 | ARG WITH_TEXLIVE="yes"
|
55 | 62 |
|
| 63 | +# Configure if we test during the build |
| 64 | +ARG WITH_TESTS="yes" |
| 65 | + |
56 | 66 | # Install TeXLive if not disabled
|
57 | 67 | RUN [ "$WITH_TEXLIVE" == "no" ] || (\
|
58 | 68 | apk add --no-cache -U poppler harfbuzz-icu zziplib texlive-full \
|
@@ -82,6 +92,7 @@ ADD Makefile.PL /opt/latexml/Makefile.PL
|
82 | 92 | #ADD manual.pdf /opt/latexml/manual.pdf
|
83 | 93 | #ADD README.pod /opt/README.pod
|
84 | 94 |
|
85 |
| -# Installing via cpanm |
| 95 | +# Installing via cpanm (with or without tests) |
86 | 96 | WORKDIR /opt/latexml
|
87 |
| -RUN cpanm . |
| 97 | + |
| 98 | +RUN if [ "$WITH_TESTS" == "no" ] ; then cpanm --notest . ; else cpanm . ; fi |
0 commit comments