-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (49 loc) · 1.29 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
ARG VARIANT=bullseye
FROM debian:${VARIANT}
LABEL org.opencontainers.image.source https://github.com/felix-kaestner/latex
ARG USER_ID=1000
ARG USER_NAME=latex
ARG USER_HOME=/home/latex
ARG USER_GECOS=LaTeX
# add default user
RUN adduser \
--home "$USER_HOME" \
--uid $USER_ID \
--gecos "$USER_GECOS" \
--disabled-password \
"$USER_NAME"
RUN apt-get update && apt-get install -y \
# latex packages and german language
texlive-latex-extra \
texlive-lang-german \
texlive-bibtex-extra \
texlive-fonts-extra \
texlive-font-utils \
# latex tools
cm-super \
biber \
latexmk \
# markup format conversion tool
pandoc \
pandoc-citeproc \
# XFig utilities
fig2dev \
# syntax highlighting package
python3-pygments \
# utilities
curl \
unzip \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
# install TUD-Script - https://github.com/tud-cd/tudscr/
RUN curl -s -L -o /tmp/tudscr.zip https://github.com/tud-cd/tudscr/releases/download/v2.06k/tudscr_v2.06k.zip \
&& unzip -o tudscr.zip -d /usr/local/share/texmf/ \
&& rm tudscr.zip \
&& texhash
# create user home directory and set permissions
RUN mkdir -p $USER_HOME \
&& chown "$USER_NAME:$USER_NAME" $USER_HOME
# switch into home directory as working directory
WORKDIR $USER_HOME
# switch to new user
USER $USER_NAME