diff --git a/docker/pandoc/Dockerfile b/docker/pandoc/Dockerfile index ead3d5e..cebfeb3 100644 --- a/docker/pandoc/Dockerfile +++ b/docker/pandoc/Dockerfile @@ -1,17 +1,19 @@ -FROM pandoc/latex:2.19.2 +FROM pandoc/extra:3.1.1 LABEL org.opencontainers.image.source = "https://github.com/marco-lancini/utils" # Install Latex packages -RUN tlmgr install adjustbox awesomebox babel-german background bidi collectbox csquotes everypage filehook fontawesome5 footmisc footnotebackref framed fvextra koma-script letltxmacro ly1 mdframed mweights needspace pagecolor pdfpages sourcecodepro sourcesanspro titlesec titling ucharcat ulem unicode-math upquote xecjk xurl zref +COPY docker/pandoc/packages.txt /packages.txt +RUN sed -e 's/ *#.*$//' -e '/^ *$/d' /packages.txt | \ + xargs tlmgr install \ + && rm -f /packages.txt -# Create low-privileged user -RUN addgroup --gid 11111 -S app -RUN adduser -s /bin/false -u 11111 -G app -S app +# Install extra requirements +COPY docker/pandoc/requirements.txt /requirements.txt +RUN pip3 install --no-cache-dir -r /requirements.txt \ + && rm -f /requirements.txt -WORKDIR /src -RUN chown -R app:app /src -USER app +WORKDIR /data # Command CMD [ "pandoc" ] diff --git a/docker/pandoc/packages.txt b/docker/pandoc/packages.txt new file mode 100644 index 0000000..c81bb99 --- /dev/null +++ b/docker/pandoc/packages.txt @@ -0,0 +1,75 @@ +# +# Latex packages required +# +# Taken from: +# https://github.com/pandoc/dockerfiles/blob/master/common/extra/packages.txt +# + +######################################################################### +# Required by pandoc-latex-environment filter +etoolbox +environ +pgf +tcolorbox +trimspaces + +######################################################################### +# Required by eisvogel template +# see https://github.com/Wandmalfarbe/pandoc-latex-template/blob/master/.github/workflows/build-examples.yml +abstract +adjustbox +awesomebox +babel-german +background +bidi +catchfile +collectbox +csquotes +everypage +filehook +fontawesome5 +footmisc +footnotebackref +framed +fvextra +hardwrap +incgraph +koma-script +letltxmacro +lineno +listingsutf8 +ly1 +mdframed +mweights +needspace +pagecolor +pdfpages +sectsty +sourcecodepro +sourcesanspro +titlesec +titling +transparent +ucharcat +ulem +unicode-math +upquote +xecjk +xurl +zref + +######################################################################### +# Completes Source family +sourceserifpro + +######################################################################### +# Required by Beamer/Metropolis +beamertheme-metropolis +pgfopts +tcolorbox +environ +tikzfill + +# https://github.com/pandoc/dockerfiles/issues/135 +enumitem + diff --git a/docker/pandoc/requirements.txt b/docker/pandoc/requirements.txt new file mode 100644 index 0000000..5541e2e --- /dev/null +++ b/docker/pandoc/requirements.txt @@ -0,0 +1,8 @@ +# +# Python filters +# +# Taken from: +# https://github.com/pandoc/dockerfiles/blob/master/common/extra/requirements.txt +# + +pandoc-latex-environment==1.1 \ No newline at end of file