2017-07-11 13:23:46 -04:00
|
|
|
# Builds all XEPs by default, HTML & PDF
|
2017-08-17 19:13:43 -04:00
|
|
|
# docker build . --build-arg NCORES=X --build-arg TARGETS="html pdf"
|
2017-07-11 13:23:46 -04:00
|
|
|
# from Dockerfile.base
|
2019-10-03 15:01:18 -04:00
|
|
|
FROM xmppxsf/xeps-base:latest as build
|
2017-05-11 10:11:29 -04:00
|
|
|
|
2017-07-11 13:23:46 -04:00
|
|
|
ARG NCORES=1
|
2019-04-09 10:47:02 -04:00
|
|
|
ARG TARGETS="html inbox-html inbox-xml pdf xeplist refs xml"
|
2017-07-11 13:23:46 -04:00
|
|
|
|
2023-12-11 12:49:58 -05:00
|
|
|
COPY *.xml xep.* *.css *.xsl *.js *.xsl Makefile /src/
|
2017-05-11 10:11:29 -04:00
|
|
|
COPY resources/*.pdf /src/resources/
|
2017-08-23 07:26:36 -04:00
|
|
|
COPY tools/*.py /src/tools/
|
2017-08-23 07:22:06 -04:00
|
|
|
COPY inbox/*.xml inbox/*.ent inbox/*.dtd /src/inbox/
|
2017-09-28 13:51:07 -04:00
|
|
|
COPY texml-xsl/*.xsl /src/texml-xsl/
|
2017-05-11 10:11:29 -04:00
|
|
|
|
2017-07-11 12:46:46 -04:00
|
|
|
WORKDIR /src
|
2017-07-11 13:23:46 -04:00
|
|
|
RUN OUTDIR=/var/www/html/extensions/ make -j$NCORES $TARGETS
|
2019-10-03 15:01:18 -04:00
|
|
|
RUN bash -c 'rm -f /var/www/html/extensions/*.{log,aux,toc,tex,tex.xml,out}'
|
2017-07-11 12:01:18 -04:00
|
|
|
|
2019-10-03 15:01:18 -04:00
|
|
|
FROM nginx:1-alpine
|
|
|
|
RUN mkdir /usr/share/nginx/html/extensions/
|
|
|
|
COPY --from=build /var/www/html/extensions/ /usr/share/nginx/html/extensions/
|
|
|
|
RUN sed -ri '/root\s+\/usr\/share\/nginx\/html/s/^(.+)$/\1\nautoindex on;/' /etc/nginx/conf.d/default.conf
|
2017-05-11 10:11:29 -04:00
|
|
|
EXPOSE 80
|