diff --git a/latex/README.md b/latex/README.md index 9f55533..5bde556 100644 --- a/latex/README.md +++ b/latex/README.md @@ -14,3 +14,7 @@ docker run --name container-name -v /path/to/latex/build/dir/on/host:/root/data The arguments that can be passed to the container are the following (in order): 1. Extra arguments for `latexmk` (you can also use this to provide the entry file) 2. Extra packages (alpine linux) to install in the container + +To build all (i.e. both the full and default image) you can use the provided `build-all.sh` script. + +The default image is just a base image that may or may not work with your latex setup, where the full image also allows building with `pygments` for e.g. minted. diff --git a/latex/default/Dockerfile b/latex/default/Dockerfile index 8ce3d31..33fb751 100644 --- a/latex/default/Dockerfile +++ b/latex/default/Dockerfile @@ -1,8 +1,8 @@ -FROM alpine +FROM archlinux:base WORKDIR /root -RUN apk add texlive texlive-bibtexextra texlive-context texlive-dvi texlive-fontutils texmf-dist-langgerman texlive-latexextra texlive-latexrecommended texlive-mathscience texlive-pictures texlive-plaingeneric texlive-pstricks texmf-dist-fontsrecommended texmf-dist-fontsextra +RUN pacman -Syu texlive-basic texlive-bin texlive-binextra texlive-fontsrecommended texlive-fontutils texlive-langgerman texlive-latex texlive-latexextra texlive-latexrecommended texlive-mathscience texlive-metapost texlive-pictures texlive-plaingeneric perl-yaml-tiny perl-file-homedir libxcrypt-compat --noconfirm COPY ./entrypoint.sh /root/ RUN chmod +x /root/entrypoint.sh diff --git a/latex/entrypoint.sh b/latex/entrypoint.sh index 81d40da..0854342 100755 --- a/latex/entrypoint.sh +++ b/latex/entrypoint.sh @@ -9,14 +9,14 @@ EXTRA_PKGS="$4" if [ -n "$EXTRA_PKGS" ]; then for pkg in $EXTRA_PKGS; do - echo "Install $pkg with apk" - apk add "$pkg" + echo "Install $pkg with pacman" + pacman -S "$pkg" done fi if [ -n "$INSTALL_HELPERS" ]; then if [ "$INSTALL_HELPERS" == "true" ]; then - apk add git + pacman -Sy git --noconfirm CURR_DIR=$(pwd) mkdir ~/projects/ || true cd ~/projects/ @@ -33,4 +33,4 @@ fi echo "latexmk with extra args $EXTRA_ARGS" -latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode $EXTRA_ARGS +latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -shell-escape $EXTRA_ARGS diff --git a/latex/full/Dockerfile b/latex/full/Dockerfile index 80b20c3..1895d33 100644 --- a/latex/full/Dockerfile +++ b/latex/full/Dockerfile @@ -2,9 +2,7 @@ FROM git.janishutz.com/registry/latex-build WORKDIR /root -RUN apk add py3-pip python3 texmf-formatsextra texlive-humanities texmf-dist-metapost texmf-dist-publishers xdvik texmf-dist-latexextra - -RUN pip3 install latexminted --break-system-packages +RUN pacman -S texlive-fontsextra texlive-publishers python-pygments --noconfirm COPY ./entrypoint.sh /root/ RUN chmod +x /root/entrypoint.sh