From 69d3ab9ed1a3dec12719eb175d0d3e22e8e62228 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 11 Jul 2017 19:23:46 +0200 Subject: [PATCH] Add NCORES and TARGETS as build params --- Dockerfile | 8 +++++++- Dockerfile.base | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e3a7b110..6f2f646b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,16 @@ +# Builds all XEPs by default, HTML & PDF +# docker build . --build-arg NCORES=X --build-arg TARGETS="target1 target2" +# from Dockerfile.base FROM xmppxsf/xeps-base:latest +ARG NCORES=1 +ARG TARGETS="html pdf" + COPY *.xml xep.* *.css *.xsl *.js *.xsl Makefile /src/ COPY resources/*.pdf /src/resources/ WORKDIR /src -RUN OUTDIR=/var/www/html/extensions/ make -j5 html pdf +RUN OUTDIR=/var/www/html/extensions/ make -j$NCORES $TARGETS EXPOSE 80 diff --git a/Dockerfile.base b/Dockerfile.base index 08156da4..7a605c0a 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,3 +1,7 @@ +# Base docker image for building XEPs +# Sets up directories and dependencies +# docker build . -t xmppxsf/xeps-base -f Dockerfile.base + FROM debian:8 MAINTAINER XSF Editors