-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.kerneldoc-sarasa-impish
52 lines (52 loc) · 2.15 KB
/
Dockerfile.kerneldoc-sarasa-impish
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
# Recent texlive/debian package lacks dependency of
# texlive-xetex -> texlive-lang-chinese, or xecjk -> ctex since June 2020.
FROM ubuntu:impish
RUN apt-get update && apt-get upgrade -y && apt-get install -y locales && \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
rm -rf /var/lib/apt/lists/*
ENV LANG en_US.utf8
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=UTC apt-get install -y tzdata && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y perl-modules \
fonts-dejavu fonts-texgyre fonts-noto-cjk fonts-liberation \
make librsvg2-bin && \
apt-get install -y --no-install-recommends texlive-lang-chinese \
texlive-xetex texlive-fonts-recommended tex-gyre inkscape graphviz dvipng \
python3-venv imagemagick latexmk && \
rm -rf /var/lib/apt/lists/*
RUN cd /usr/local/share/texmf && \
mkdir fonts && cd fonts && \
mv /usr/share/fonts/opentype/urw-base35/StandardSymbolsPS.otf .
RUN cd /etc/ImageMagick-6 && sed -i 's+policy domain="coder" rights="none" pattern="PDF"+policy domain="coder" rights="read|write" pattern="PDF"+' policy.xml
COPY sarasa-mono-k-regular.ttf sarasa-mono-k-bold.ttf sarasa-mono-k-italic.ttf sarasa-mono-k-bolditalic.ttf /usr/local/share/fonts/
RUN fc-cache /usr/local/share/fonts/
COPY requirements.txt requirements-1.7.9.txt requirements-latest.txt /opt/
ARG uid=0
ARG gid=0
ARG user=kerneldoc
ARG group=kerneldoc
RUN if [ $uid -ne 0 ] ; then \
groupadd -g $gid $group ; \
useradd -u $uid -g $gid -m $user ; \
fi
USER $uid:$gid
WORKDIR /home/kerneldoc
RUN /usr/bin/python3 -m venv sphinx_2.4.4 && \
. sphinx_2.4.4/bin/activate && \
pip install --upgrade pip && \
pip install -r /opt/requirements.txt && \
deactivate
RUN /usr/bin/python3 -m venv sphinx_1.7.9 && \
. sphinx_1.7.9/bin/activate && \
pip install --upgrade pip && \
pip install -r /opt/requirements-1.7.9.txt && \
deactivate
RUN /usr/bin/python3 -m venv sphinx_latest && \
. sphinx_latest/bin/activate && \
pip install --upgrade pip && \
pip install -r /opt/requirements-latest.txt && \
deactivate
VOLUME /work
WORKDIR /work
CMD /bin/bash