-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
57 lines (48 loc) · 1.84 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
FROM sharelatex/sharelatex AS base
# # Install TeX Live: metapackage pulling in all components of TeX Live
# RUN set -x && \
# apt-get update && \
# DEBIAN_FRONTEND=noninteractive apt install -y texlive-full
RUN set -x && \
# tlmgr init-usertree \
## Select closest mirror automatically: http://tug.org/texlive/doc/install-tl.html
#
## Use latest TeX Live repository
# tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet/ && \
#
## Use year specific TeX Live repository
# tlmgr option repository ftp://tug.org/historic/systems/texlive/2017/tlnet-final && \
#
## Use local TeX Live repository from nginx
# tlmgr option repository http://nginx/ && \
#
tlmgr update --all && \
# https://github.com/overleaf/toolkit/blob/master/doc/ce-upgrading-texlive.md
tlmgr install scheme-full && \
# Symlink all the binaries into the system path
tlmgr path add
# Install additional tools used by TeX packages
RUN set -x && \
apt-get update && \
apt-get install -y --no-install-recommends python3-pip && \
# Cleanup
apt-get clean && rm -rf /var/lib/apt
# Code Highlighting with minted
# https://www.overleaf.com/learn/latex/Code_Highlighting_with_minted
RUN pip install latexminted
####################
# Stage shell-escape
####################
FROM base AS shell-escape
# Tools mentioned by the community:
# https://tex.stackexchange.com/questions/598818/how-can-i-enable-shell-escape
# Enable shell-escape
RUN printf "\n%% Enable shell-escape\nshell_escape = t\n" | \
/bin/bash -c "tee -a /usr/local/texlive/*/texmf.cnf"
# Install additional tools used by TeX packages
RUN set -x && \
apt-get update && \
apt-get install -y --no-install-recommends graphviz gnuplot inkscape asymptote && \
# Cleanup
apt-get clean && rm -rf /var/lib/apt
RUN pip install dot2tex