Skip to content

Commit

Permalink
Merge pull request #145 from rrthomas/Docker
Browse files Browse the repository at this point in the history
Created Dockerfile
  • Loading branch information
entorb authored Jun 12, 2023
2 parents 06985c9 + 71a3901 commit 2755535
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2755535

Please sign in to comment.