-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.kerneldoc-archlinux
38 lines (38 loc) · 1.1 KB
/
Dockerfile.kerneldoc-archlinux
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
FROM archlinux:latest
# ARG variables: ink for inkscape, img for imagemagick
# extra/librsvg is in dependency of graphviz ??
# Defaults: ink=1, img=0
RUN pacman --noconfirm -Syu && \
pacman --noconfirm -S perl which graphviz make \
noto-fonts-cjk python ttf-dejavu ttf-liberation \
texlive-core texlive-latexextra texlive-langchinese texlive-bin && \
rm -rf /var/cache/pacman/pkg/
ARG ink=1
ARG img=0
RUN pacman --noconfirm -Syu && \
if [ $ink -ne 0 ] ; then \
pacman --noconfirm -S inkscape ; \
fi && \
if [ $img -ne 0 ] ; then \
pacman --noconfirm -S imagemagick ; \
fi && \
rm -rf /var/cache/pacman/pkg/
COPY 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_latest && \
. sphinx_latest/bin/activate && \
pip install --upgrade pip && \
pip install -r /opt/requirements-latest.txt && \
deactivate
VOLUME /work
WORKDIR /work
CMD /bin/bash