From 71a39017bb8ca4b529cd96620c681a6cbc8b1227 Mon Sep 17 00:00:00 2001 From: Torben <59419684+entorb@users.noreply.github.com> Date: Tue, 16 May 2023 19:48:25 +0200 Subject: [PATCH] Create Dockerfile --- Dockerfile | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..a3b5f983c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +# syntax=docker/dockerfile:1 + +# base image +FROM ubuntu:latest + +# set timezone +ENV TZ=Europe/Berlin + +# prevent keyboard input requests in apt install +ARG DEBIAN_FRONTEND=noninteractive + +# install core packages +RUN apt-get update +RUN apt-get install -y python3 git + +# for pdf, copied from scripts/install_requirements_pdf.sh +RUN apt-get install -y texlive-xetex texlive-lang-german latexmk +# for ebook, copied from scripts/install_requirements_ebook.sh +RUN apt-get install -y texlive-extra-utils pandoc calibre imagemagick ghostscript + +# set working directory +WORKDIR /app + +# mount host directory as volume +VOLUME /app + +# default command: build 1-vol pdf and all ebook formats +CMD latexmk hpmor ; ./scripts/make_ebooks.sh + +# build/update image via +# docker build -t hpmor . + +# run default commands (see above) via +# docker run -it --mount type=bind,src="$(pwd)",dst=/app hpmor + +# run specific command or script +# docker run -it --mount type=bind,src="$(pwd)",dst=/app hpmor latexmk hpmor-1 + +# login via +# docker run -it --mount type=bind,src="$(pwd)",dst=/app hpmor bash