From 8e9f9b39110836e6cd54926a44f17ea6befa9f22 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 11 Jul 2017 18:46:46 +0200 Subject: [PATCH] Add a base dockerfile to only build the xeps in CI --- Dockerfile | 20 +++----------------- Dockerfile.base | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 Dockerfile.base diff --git a/Dockerfile b/Dockerfile index 1e3fc1f9..e3a7b110 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,10 @@ -FROM debian:8 -MAINTAINER XSF Editors +FROM xmppxsf/xeps-base:latest -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update && apt-get -y dist-upgrade -RUN apt-get install -y xsltproc libxml2-utils libxml2 texlive fonts-inconsolata make nginx - -RUN mkdir /src COPY *.xml xep.* *.css *.xsl *.js *.xsl Makefile /src/ -RUN mkdir /src/resources COPY resources/*.pdf /src/resources/ -WORKDIR /src -RUN apt-get install -y curl python python-pip texlive-xetex -RUN curl https://pilotfiber.dl.sourceforge.net/project/getfo/texml/texml-2.0.2/texml-2.0.2.tar.gz -o texml-2.0.2.tar.gz && tar -xf texml-2.0.2.tar.gz && pip install texml-2.0.2/ && rm -rf texml-2.0.2 -RUN apt-get install -y texlive-fonts-recommended texlive-fonts-extra -RUN mkdir /var/www/html/extensions -RUN OUTDIR=/var/www/html/extensions/ make html pdf -RUN cat /sys/fs/cgroup/cpuset/cpuset.cpus || true -RUN cat /proc/cpuinfo || true +WORKDIR /src +RUN OUTDIR=/var/www/html/extensions/ make -j5 html pdf EXPOSE 80 diff --git a/Dockerfile.base b/Dockerfile.base new file mode 100644 index 00000000..08156da4 --- /dev/null +++ b/Dockerfile.base @@ -0,0 +1,17 @@ +FROM debian:8 +MAINTAINER XSF Editors + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && \ + apt-get -y dist-upgrade && \ + apt-get install -y \ + xsltproc libxml2-utils libxml2 texlive fonts-inconsolata make nginx \ + curl python python-pip texlive-xetex texlive-fonts-recommended \ + texlive-fonts-extra +RUN curl https://pilotfiber.dl.sourceforge.net/project/getfo/texml/texml-2.0.2/texml-2.0.2.tar.gz -o texml-2.0.2.tar.gz && \ + tar -xf texml-2.0.2.tar.gz && \ + pip install texml-2.0.2/ && \ + rm -rf texml-2.0.2 + +RUN mkdir -p /src/resources /var/www/html/extensions