Skip to content

Commit

Permalink
use docker as first attempt at reproducibility
Browse files Browse the repository at this point in the history
  • Loading branch information
japm48 committed Jun 3, 2023
1 parent 6fdaab1 commit 6a8aa63
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

.texlive*/
_minted-main/
main*
~main.tex
*.fls

12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
########
# DOCKER_BUILDKIT=1 docker build -t my-texlive-23 .
# docker run -v .:/work --env GU_IDS="$(id -u):$(id -g)" -it my-texlive-23
########


FROM texlive/texlive:TL2022-historic
# FROM registry.gitlab.com/islandoftex/images/texlive:TL2022-historic

WORKDIR /work
CMD bash /work/_docker_run.sh

23 changes: 23 additions & 0 deletions _docker_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env dont-run-me-directly bash

set -e

if [[ $UID -eq 0 && ! -z "$GU_IDS" ]]
then
# Self-contained bootstrap.
# This is so that the correct gid/uid are set.
U_ID=$(echo $GU_IDS | cut -d: -f1)
G_ID=$(echo $GU_IDS | cut -d: -f2)

id myuser &>/dev/null && userdel myuser
rm -rf /myuser
groupadd myuser -g "$G_ID"
useradd myuser -u "$U_ID" -g "$G_ID" --home /myuser --create-home
su myuser -c "bash $BASH_SOURCE"
exit
fi

#latexmk -xelatex -shell-escape ./main.tex
latexmk -pdf -shell-escape ./main.tex


0 comments on commit 6a8aa63

Please sign in to comment.