Skip to content

Commit 0e4c45c

Browse files
authored
Merge pull request #11 from GMHDBJD/AddDockerfile
docker: add Dockerfile for building
2 parents a0f8ebd + ea470e2 commit 0e4c45c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# e.g.
2+
# docker build -t sysu-thesis:latest .
3+
# docker run -i -v $(pwd):/sysu-thesis sysu-thesis:latest make pdf
4+
FROM alpine:3.10
5+
6+
## init environment
7+
RUN apk add --no-cache \
8+
texlive-full make git
9+
10+
# install font
11+
RUN mkdir -p /usr/share/fonts/opentype
12+
RUN git clone https://github.com/a20185/adobefonts
13+
RUN chmod +x adobefonts/runner.sh
14+
RUN adobefonts/runner.sh
15+
RUN fc-cache -f -v
16+
17+
# add entrypoint
18+
RUN echo $'#!/bin/sh\n\
19+
cd /sysu-thesis\n\
20+
cp sysuthesis.cls sysuthesis.cls.old\n\
21+
sed -i "s/Times New Roman/Nimbus Roman No9 L/g" sysuthesis.cls\n\
22+
$@\n\
23+
mv sysuthesis.cls.old sysuthesis.cls\n' >> /entrypoint.sh
24+
RUN chmod +x /entrypoint.sh
25+
26+
ENTRYPOINT [ "/entrypoint.sh" ]
27+
CMD [ "make", "pdf" ]

0 commit comments

Comments
 (0)