From eb6b2b1b328914d15e7b610af93ab1092e02c236 Mon Sep 17 00:00:00 2001 From: Johannes Schickling Date: Sun, 23 Nov 2014 14:27:34 +0100 Subject: [PATCH] latex --- latex/Dockerfile | 11 +++++++++++ latex/README.md | 23 +++++++++++++++++++++++ latex/install.sh | 14 ++++++++++++++ octave/Dockerfile | 2 +- 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 latex/Dockerfile create mode 100644 latex/README.md create mode 100644 latex/install.sh diff --git a/latex/Dockerfile b/latex/Dockerfile new file mode 100644 index 0000000..71f5828 --- /dev/null +++ b/latex/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:wheezy +MAINTAINER Johannes Schickling "schickling.j@gmail.com" + +ENV DEBIAN_FRONTEND noninteractive + +ADD install.sh install.sh +RUN chmod +x install.sh && ./install.sh && rm install.sh + +VOLUME ["/source"] +WORKDIR /source +CMD ["bash"] diff --git a/latex/README.md b/latex/README.md new file mode 100644 index 0000000..2126169 --- /dev/null +++ b/latex/README.md @@ -0,0 +1,23 @@ +# latex + +Full texlive distribution + +## Usage + +```sh +$ docker run --rm -it -v $(pwd):/source schickling/latex +``` + +Mount your local source folder to the container and run it inside the container. + +#### Compiling a latex document + +```sh +$ pdflatex my-document.tex +``` + +#### Compiling a xetex document + +```sh +$ xelatex my-document.xtx +``` diff --git a/latex/install.sh b/latex/install.sh new file mode 100644 index 0000000..0107a6b --- /dev/null +++ b/latex/install.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +# exit if a command fails +set -e + +# install full texlive distribution +apt-get update && apt-get install -y texlive-full + +# cleanup package manager +apt-get autoclean && apt-get clean +rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +# prepare dir +mkdir /source diff --git a/octave/Dockerfile b/octave/Dockerfile index 71f5828..3590f0f 100644 --- a/octave/Dockerfile +++ b/octave/Dockerfile @@ -8,4 +8,4 @@ RUN chmod +x install.sh && ./install.sh && rm install.sh VOLUME ["/source"] WORKDIR /source -CMD ["bash"] +CMD ["octave"]