forked from bogdanb/hpmor
-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from rrthomas/Docker
Created Dockerfile
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |