Add NCORES and TARGETS as build params

This commit is contained in:
mathieui 2017-07-11 19:23:46 +02:00 committed by Guus der Kinderen
parent 8e9f9b3911
commit 69d3ab9ed1
2 changed files with 11 additions and 1 deletions

View File

@ -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 FROM xmppxsf/xeps-base:latest
ARG NCORES=1
ARG TARGETS="html pdf"
COPY *.xml xep.* *.css *.xsl *.js *.xsl Makefile /src/ COPY *.xml xep.* *.css *.xsl *.js *.xsl Makefile /src/
COPY resources/*.pdf /src/resources/ COPY resources/*.pdf /src/resources/
WORKDIR /src WORKDIR /src
RUN OUTDIR=/var/www/html/extensions/ make -j5 html pdf RUN OUTDIR=/var/www/html/extensions/ make -j$NCORES $TARGETS
EXPOSE 80 EXPOSE 80

View File

@ -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 FROM debian:8
MAINTAINER XSF Editors <editor@xmpp.org> MAINTAINER XSF Editors <editor@xmpp.org>