-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
70 lines (53 loc) · 2.34 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
59
60
61
62
63
64
65
66
67
68
69
70
ARG BASE=sharelatex/sharelatex
ARG TEXLIVE_IMAGE=registry.gitlab.com/islandoftex/images/texlive:latest
# ARG SRC=./src
# ARG FONTS=./fonts
FROM $TEXLIVE_IMAGE as texlive
FROM $BASE as app
# set workdir (might solve issue #2 - see https://stackoverflow.com/questions/57534295/)
WORKDIR /overleaf/services/web/
# install latest npm
RUN npm install axios --registry=https://registry.npm.taobao.org
RUN npm install jsonwebtoken --registry=https://registry.npm.taobao.org
RUN npm install node-rsa --registry=https://registry.npm.taobao.org
RUN npm install fs --registry=https://registry.npm.taobao.org
# install pygments and some fonts dependencies
RUN apt-get update && apt-get -y install \
python3-pygments \
nano \
fonts-noto-cjk \
fonts-noto-cjk-extra \
fonts-noto-color-emoji \
xfonts-wqy \
fonts-font-awesome
# COPY router
RUN rm /overleaf/services/web/app/src/router.js
COPY ./src/Oauth/router.js /overleaf/services/web/app/src/
# COPY Auth Control
RUN rm /overleaf/services/web/app/src/Features/Authentication/AuthenticationController.js
COPY ./src/Oauth/AuthenticationController.js /overleaf/services/web/app/src/Features/Authentication/
# COPY Auth Manager
RUN rm /overleaf/services/web/app/src/Features/Authentication/AuthenticationManager.js
COPY ./src/Oauth/AuthenticationManager.js /overleaf/services/web/app/src/Features/Authentication/
# COPY login.pug
RUN rm /overleaf/services/web/app/views/user/login.pug
COPY ./src/Oauth/login.pug /overleaf/services/web/app/views/user/
# extend pdflatex with option shell-esacpe (fix for closed overleaf/overleaf/issues/217 and overleaf/docker-image/issues/45)
# RUN sed -iE "s%-synctex=1\",%-synctex=1\", \"-shell-escape\",%g" /overleaf/services/clsi/app/js/LatexRunner.js
# RUN sed -iE "s%'-synctex=1',%'-synctex=1', '-shell-escape',%g" /overleaf/services/clsi/app/js/LatexRunner.js
# Update TeXLive
COPY --from=texlive /usr/local/texlive /usr/local/texlive
RUN echo "shell_escape = t" >> /usr/local/texlive/2022/texmf.cnf
# RUN cd /usr/local/texlive
# Add a mirrors
RUN tlmgr option repository https://mirrors.ustc.edu.cn/CTAN/systems/texlive/tlnet
RUN tlmgr path add
RUN tlmgr update --self --all
RUN tlmgr install scheme-full
# add fonts
RUN mkdir -p /usr/share/fonts/winfonts
COPY ./fonts/ /usr/share/fonts/winfonts/
RUN cd /usr/share/fonts/winfonts
RUN mkfontscale
RUN mkfontdir
RUN fc-cache -fv