Skip to content

Commit

Permalink
Dockerfile: bind mount the build context
Browse files Browse the repository at this point in the history
Instead of copying individual files into /src, we simply bind mount
the build context, which is typically the XEPs repo, and invoke 'make'
with the givne targets on that.
  • Loading branch information
Flowdalic committed Jan 23, 2023
1 parent b2bb27f commit 5bc830b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ FROM xmppxsf/xeps-base:latest as build
ARG NCORES=1
ARG TARGETS="html inbox-html inbox-xml pdf xeplist refs xml"

COPY *.xml xep.* *.css *.xsl *.js *.xsl Makefile /src/
COPY resources/*.pdf /src/resources/
COPY tools/*.py /src/tools/
COPY inbox/*.xml inbox/*.ent inbox/*.dtd /src/inbox/
COPY texml-xsl/*.xsl /src/texml-xsl/

WORKDIR /src
RUN OUTDIR=/var/www/html/extensions/ make -j$NCORES $TARGETS
RUN --mount=target=/xeps make -C /xeps -j$NCORES $TARGETS OUTDIR=/var/www/html/extensions
RUN bash -c 'rm -f /var/www/html/extensions/*.{log,aux,toc,tex,tex.xml,out}'

FROM nginx:1-alpine
Expand Down

0 comments on commit 5bc830b

Please sign in to comment.