Skip to content

Commit

Permalink
PDF generation via Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
d-w-moore authored and trel committed Jun 21, 2022
1 parent 30b157c commit d992791
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ apt-get install -y make texlive-latex-base texlive-latex-recommended texlive-lat

`make clean` will remove any generated files.

Alternatively, or on OSes not derived from Debian, Docker may be installed and the PDF conversion achieved with: `sudo bash pdf_from_latex.sh`.

## Advanced

The Advanced training assumes a working knowledge and understanding of basic iRODS functionality and terminology. It is not as self contained, but provides the code examples used by the instructors. The code examples should be executable.
Expand Down
6 changes: 6 additions & 0 deletions beginner/Dockerfile.pdflatex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ubuntu:20.04
RUN apt update
ENV DEBIAN_FRONTEND noninteractive
RUN apt install -y git texlive-latex-base texlive-latex-recommended texlive-latex-extra
WORKDIR /tmp
ENTRYPOINT [ "pdflatex" ]
4 changes: 2 additions & 2 deletions beginner/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL=/bin/bash

default:
pdflatex irods_beginner_training_2019.tex
pdflatex irods_beginner_training_2022.tex

clean:
rm -f irods_beginner_training_2019.{aux,log,out,toc}
rm -f irods_beginner_training_2022.{aux,log,out,toc}
Binary file removed beginner/irods_beginner_training_2019.pdf
Binary file not shown.
9 changes: 9 additions & 0 deletions beginner/pdf_from_latex.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
CMDDIR=$(dirname "$0")
cd "$CMDDIR"
docker build --quiet=true --rm -t pdf_from_latex -f Dockerfile.pdflatex . || {
echo "Docker must be installed for this script to work." >&2
exit 1
}
docker run --rm -v `pwd`:/tmp -t pdf_from_latex *.tex
make clean

0 comments on commit d992791

Please sign in to comment.