Move to arch based images

This commit is contained in:
2025-12-23 16:16:00 +01:00
parent f4f60a1418
commit cbe823c9e3
4 changed files with 11 additions and 9 deletions

View File

@@ -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): 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) 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 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.

View File

@@ -1,8 +1,8 @@
FROM alpine FROM archlinux:base
WORKDIR /root 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/ COPY ./entrypoint.sh /root/
RUN chmod +x /root/entrypoint.sh RUN chmod +x /root/entrypoint.sh

View File

@@ -9,14 +9,14 @@ EXTRA_PKGS="$4"
if [ -n "$EXTRA_PKGS" ]; then if [ -n "$EXTRA_PKGS" ]; then
for pkg in $EXTRA_PKGS; do for pkg in $EXTRA_PKGS; do
echo "Install $pkg with apk" echo "Install $pkg with pacman"
apk add "$pkg" pacman -S "$pkg"
done done
fi fi
if [ -n "$INSTALL_HELPERS" ]; then if [ -n "$INSTALL_HELPERS" ]; then
if [ "$INSTALL_HELPERS" == "true" ]; then if [ "$INSTALL_HELPERS" == "true" ]; then
apk add git pacman -Sy git --noconfirm
CURR_DIR=$(pwd) CURR_DIR=$(pwd)
mkdir ~/projects/ || true mkdir ~/projects/ || true
cd ~/projects/ cd ~/projects/
@@ -33,4 +33,4 @@ fi
echo "latexmk with extra args $EXTRA_ARGS" 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

View File

@@ -2,9 +2,7 @@ FROM git.janishutz.com/registry/latex-build
WORKDIR /root WORKDIR /root
RUN apk add py3-pip python3 texmf-formatsextra texlive-humanities texmf-dist-metapost texmf-dist-publishers xdvik texmf-dist-latexextra RUN pacman -S texlive-fontsextra texlive-publishers python-pygments --noconfirm
RUN pip3 install latexminted --break-system-packages
COPY ./entrypoint.sh /root/ COPY ./entrypoint.sh /root/
RUN chmod +x /root/entrypoint.sh RUN chmod +x /root/entrypoint.sh