FROM openjdk:17-jdk-alpine ENV SHELL /bin/bash RUN apk update && apk add bash subversion git ruby ruby-dev build-base texlive texlive-dvi texmf-dist-science texmf-dist-latexextra texmf-dist-fontsextra ghostscript file emacs sudo curl diffutils RUN gem install json ARG BASEXDIR=/home/basex RUN adduser -s /bin/bash -D -h ${BASEXDIR} basex USER basex WORKDIR ${BASEXDIR} ARG SVNREPO=subversion.le-tex.de/common/math-renderer # This will create a different HTML file if the repo revision is changed. # This will change the Dockerfile cache hash so that the cache is invalidated # for the next RUN instruction. # https://stackoverflow.com/questions/35134713/disable-cache-for-specific-run-commands#answer-58801213 ADD https://${SVNREPO}/ revision.xml RUN svn co https://${SVNREPO} ARG GITREPOURL=https://github.com/transpect/latex-math-images ARG GITBRANCH=main # This will create a different JSON file if the repo/branch has new commits. # This will change the Dockerfile cache hash so that the cache is invalidated # for the next RUN instruction. ADD https://api.github.com/repos/transpect/latex-math-images/branches repo.json WORKDIR math-renderer RUN git clone -b ${GITBRANCH} ${GITREPOURL} RUN cp -r latex-math-images/basex-webapp basex/webapp/eqimg USER root RUN apk del subversion git ruby-dev build-base RUN rm -rf /var/cache/apk/* USER basex EXPOSE 8984 ENV HEAP=6g ENV CACHETIMEOUT=10800 CMD basex/bin/basexhttp 2>&1